medium10 pts · first answer countstest-automationjesttest-isolation
A mock leaking into other tests
One test does jest.spyOn(Date, "now").mockReturnValue(0). Later tests in the file start failing on dates. What is the cleanest fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Arrange, Act, AssertAutomation Test Engineer
- An upside-down test pyramidAutomation Test Engineer
- Sharing fixtures in pytestAutomation Test Engineer
- Asserting that an error is raisedAutomation Test Engineer
- Running pytest in parallelAutomation Test Engineer
- A keyword-driven frameworkAutomation Test Engineer
- Layers in a test frameworkAutomation Test Engineer
- Where test passwords belongAutomation Test Engineer