Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uriklar/react-testing-library-with-use-context
https://github.com/uriklar/react-testing-library-with-use-context
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/uriklar/react-testing-library-with-use-context
- Owner: uriklar
- Created: 2019-03-21T14:22:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T16:37:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-17T16:05:28.010Z (about 1 month ago)
- Language: JavaScript
- Size: 3.81 MB
- Stars: 2
- Watchers: 1
- Forks: 5
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## The goal
I want to test a component the uses a custom hook, that uses the useContext hook.
## The problem
When running two consecutive tests with a cleanup between them , my context is persisted from the previous test.
I also tried mocking the context provider between every test run.
How can I achieve a fresh context on every run?
Thanks!!!