-
Hey,
In the first test I wish to simulate a case where the user has a active vacation, while in the second I wish to start with no vacation, perform some actions, and return a vacation when the endpoint is called a second time. Where I struggle is cleaning up after the first test. If I I realised what the issue is as I'm tying this up. Will post it anyway as it might help someone else down the road. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem was that I was using I needed to add |
Beta Was this translation helpful? Give feedback.
The problem was that I was using
react-query
and the first fetch for a vacation was adding the vacation to the cache.I needed to add
queryClient.clear();
to theafterEach
.