Skip to content
This repository was archived by the owner on Mar 15, 2021. It is now read-only.
This repository was archived by the owner on Mar 15, 2021. It is now read-only.

stop and stopAll should also clear out the cache of previously mocked module #45

@normanzb

Description

@normanzb

We hit an issue of subsequencing tests keep loading previously mocked dependency.
It stops only if we add reRequire(moduleInQuestion) after previous test finished running to clear out cache:

testA.js

afterEach(() => {
  mock.stopAll()
  mock.reRequire('../dep')
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions