Jest set, clear and reset mock/spy/stub implementation · Code with Hugo

added by JavaScript Kicks
11/12/2019 12:59:43 PM

209 Views

Between test runs we need mocked/spied on imports and functions to be reset so that assertions don't fail due to stale calls (from a previous test). This is a way to mitigate what little statefulness is in the system.


0 comments