False negative testing-library/no-unnecessary-act #685
Replies: 1 comment 2 replies
-
Hi @douglasjunior! Interesting issue… It's definitely a false negative, but I have no clue what could be causing it! Could you try something for me: remove the optional chaining operator from the act(() => {
dismissCallback();
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In one test case we called a function within ACT that ESLint indicates is a testing-library function, but is not.
And
dismissCallback
need to be wrapped withact
because it dispatches a state update to close the AlertModal.It's a false negative, right?
Versions:
Beta Was this translation helpful? Give feedback.
All reactions