How can I import my global state into react-testing-library? #453
Replies: 1 comment
-
You shouldn't call hooks or funcions inside your tests scripts. You must only test the user behavior and their responses. |
Beta Was this translation helpful? Give feedback.
0 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.
-
My problem is when I try to import my global state for my popup into my testing file and try to use it. Then it tells me that I am using the hook wrong and it doesn't work.
my testing code:
my global state code:
How can I solve this problem with react-testing-library?
Beta Was this translation helpful? Give feedback.
All reactions