flâneur — a map of the web's best reading

Bypassing module mocks · Jest

jestjs.io · 445 words · saved by 1 readers

Jest allows you to mock out whole modules in your tests, which can be useful for testing if your code is calling functions from that module correctly. However, sometimes you may want to use parts of a mocked module in your test file, in which case you want to access the original implementation, rather than a mocked version.

Explore this link on the map →

saved by