Last active
March 10, 2023 17:16
-
-
Save yogain123/b83ea8e75e1c0d20829eab0b895f5582 to your computer and use it in GitHub Desktop.
Testing React - JEST + RTL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hola |
Act Utility
Typically RTL wrap all code in ACT function that causes state update, however in this particular instance you are direclty calling increment which in turn directly calls a function that causes the state update, and that function is setCount, there is just no way for RTL to wrap this function in ACT and thats why it warn to add ACT.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basics