I'm trying to add @testing-library/jest-dom
to my project with no luck. It is installed by yarn into my dev dependencies and imported in setupTests.js with:
import '@testing-library/jest-dom';
The test fails with:
Invalid Chai property: toBeDisabled
40 | it('should be disabled', async () => {
41 | const button = screen.getByRole('button', { name: 'Create button' });
> 42 | expect(button).toBeDisabled();
| ^
43 | });
44 | });
Where am I going wrong?