Closed
Description
React (and react-test-renderer) version: 17.0.2
Eslint version: 8.6.0
Steps To Reproduce
- create a
ReactTestInstance
usingcreate
fromreact-test-renderer
- Try to run access
findByProps
of the root ofReactTestInstance
- Eslint(
testing-library/await-async-query
) will show an error
code example:
// simulate nav toggle click event
create(<Nav onToggle={mockFunction} items={[]}></Nav>)
.root.findByProps({
className: "app__nav-toggler",
})
.props.onClick();
The current behavior
Eslint(testing-library/await-async-query) will show an error:
The expected behavior
Since the return type of findByProps
is not actually a promise, the error should not appear. findByProps
appears to be synchronous.