This repository contains a codemod for react-testing-library using jsCodeshift. The codemod-prefer-explicit-assert
addresses the eslint-plugin-testing-library
rule prefer-explicit-assert
git clone https://github.com/zerodom30/codemod-prefer-explicit-assert.git
cd codemod-prefer-explicit-assert/
yarn install or npm install
yarn transform path/to/files
While this codemod is meant to run against testing-library/react
it can be used with testing-library/dom
however it is not well tested in that scenario.
This library is a fork off of eslint-jest-testing-library-codemod, so codemod-prefer-explicit-assert
could also be run as a fixer
with that repo.