Closed
Description
Describe the bug
expect.hasAssertion
and expect.assertions
always pass even when there are not the right number of assertions
Steps to Reproduce
import { expect } from "jsr:@std/expect";
Deno.test("should fail", () => {
expect.hasAssertions();
});
Deno.test("should also fail", () => {
expect.assertions(2);
expect(1).toBe(1);
});
Expected behavior
Both tests fail
Environment
- OS: Win11
- deno version: 2.2.5
- std version: 1.0.14