eslint-plugin-jest-dom version: 5.4.0
node version: 20.9
npm version: 9.8.1
Relevant code or config
Using jest-extended's method toBeTrue() does not work with autofixer of jest-dom/prefer-to-have-class
expect(node.classList.contains('a')).toBe(true);
expect(node.classList.contains('b')).toBeTrue();
What you did:
Run auto-fixer for jest-dom/prefer-to-have-class assertions
What happened:
expect(node).toHaveClass('a');
expect(node).not.toHaveClass('b');
Problem description:
toBeTrue() will be fixed to not.toHaveClass()
Suggested solution:
eslint-plugin-jest-domversion: 5.4.0nodeversion: 20.9npmversion: 9.8.1Relevant code or config
Using
jest-extended's methodtoBeTrue()does not work with autofixer ofjest-dom/prefer-to-have-classWhat you did:
Run auto-fixer for
jest-dom/prefer-to-have-classassertionsWhat happened:
Problem description:
toBeTrue()will be fixed tonot.toHaveClass()Suggested solution: