You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but eslint will crash because: prefer-in-document rules makes it crash while parsing the code. since no argument is in the matcherArguments, matcherArguments[0].value is .value on undefined
describe('Home',()=>{it('renders the list items',()=>{render(<Home/>);constlist=screen.getByRole('list');expect(list).toBeInTheDocument();constlistItems=screen.queryAllByRole('listitem');expect(listItems).toHaveLength();});});
Also, following lines will be replaced by prefer-in-document falsely:
eslint-plugin-jest-dom
version: 4.0.2node
version: 16.17.0npm
version: 8.19.0Relevant code or config
test for following component will fail since jest matcher toHaveLength doesn't have its required expected:number parameter:
but eslint will crash because: prefer-in-document rules makes it crash while parsing the code. since no argument is in the matcherArguments, matcherArguments[0].value is .value on undefined
Also, following lines will be replaced by prefer-in-document falsely:
fixed to:
commas are still there.
What I did and Suggested solution:
Fix (#276)
Reproduction repository:
https://github.com/berkinanik/with-jest-app
The text was updated successfully, but these errors were encountered: