Skip to content

uriklar/react-testing-library-with-use-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!!!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages