Closed
Description
Describe the bug
If one expect.hasAssertion
or expect.assertions
test fails, others may be affected.
Steps to Reproduce
Only the first test should fail, but the second also fails: the assertion from the first test leaked into the second.
test("failing test", () => {
expect.assertions(0);
expect(1).toEqual(1);
});
test("expect no assertions", () => {
expect.assertions(0);
});
Expected behavior
Assertions tests should not interact across testing contexts
Environment
- OS: Win11
- deno version: 2.2.5
- std version: latest