-
Notifications
You must be signed in to change notification settings - Fork 153
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingtriagePending to be triaged by a maintainerPending to be triaged by a maintainer
Description
Have you read the Troubleshooting section?
Yes
Plugin version
v5.0.1
ESLint version
v8.46.0
Node.js version
20.5.0
package manager and version
yarn 1.22.19
Operating system
Ubuntu 22.04
Bug description
I defined the following check to ensure an element with the given id is not present:
expect(renderResult.container.querySelector('#my-id')).toBeFalsy();The rule "testing-library/no-node-access" is not ok with it, whereas from document nothing should break:
"This rule aims to disallow DOM traversal using native HTML methods and properties, such as closest, lastChild and all that returns another Node element from an HTML tree."
(or I misunderstood this understood).
Steps to reproduce
Apply the previous code snippet
Error output/screenshots
No response
ESLint configuration
{
"extends": [
"react-app",
"react-app/jest"
],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
Rule(s) affected
testing-library/no-node-access
Anything else?
No response
Do you want to submit a pull request to fix this bug?
No
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriagePending to be triaged by a maintainerPending to be triaged by a maintainer