bun test v1.4.4 (38afee6c8)

student-tests/browser-lifecycle.test.ts:
12 |     reportCleanupFailure:async error=>{reports.push(error);},
13 |   });
14 |   return {run,primary,secondary,reports,closes:()=>closes};
15 | }
16 | test("newPage rejection closes the already acquired context exactly once",async()=>{
17 |  const f=fixture("newPage");await expect(f.run()).rejects.toBe(f.primary);expect(f.closes()).toBe(1);
                                                                                                  ^
error: expect(received).toBe(expected)

Expected: 1
Received: 0

      at <anonymous> (/Users/rey/mtuci/vp/lab7/student-tests/browser-lifecycle.test.ts:17:94)
(fail) newPage rejection closes the already acquired context exactly once [0.62ms]
15 | }
16 | test("newPage rejection closes the already acquired context exactly once",async()=>{
17 |  const f=fixture("newPage");await expect(f.run()).rejects.toBe(f.primary);expect(f.closes()).toBe(1);
18 | });
19 | test("listener setup failure closes the already acquired context exactly once",async()=>{
20 |  const f=fixture("listener");await expect(f.run()).rejects.toBe(f.primary);expect(f.closes()).toBe(1);
                                                                                                   ^
error: expect(received).toBe(expected)

Expected: 1
Received: 0

      at <anonymous> (/Users/rey/mtuci/vp/lab7/student-tests/browser-lifecycle.test.ts:20:95)
(fail) listener setup failure closes the already acquired context exactly once [0.08ms]
(pass) normal browser work returns its result and closes exactly once [0.05ms]
21 | });
22 | test("normal browser work returns its result and closes exactly once",async()=>{
23 |  const f=fixture("none");expect(await f.run()).toBe("complete");expect(f.closes()).toBe(1);expect(f.reports).toEqual([]);
24 | });
25 | test("cleanup failure is separately reported without replacing the primary error",async()=>{
26 |  const f=fixture("listener",true);await expect(f.run()).rejects.toBe(f.primary);expect(f.closes()).toBe(1);expect(f.reports).toEqual([f.secondary]);
                                                                                                        ^
error: expect(received).toBe(expected)

Expected: 1
Received: 0

      at <anonymous> (/Users/rey/mtuci/vp/lab7/student-tests/browser-lifecycle.test.ts:26:100)
(fail) cleanup failure is separately reported without replacing the primary error [0.06ms]
(pass) cleanup failure after successful work remains a failure [0.04ms]
(pass) missing ports reject before any browser can be acquired [0.03ms]

 3 pass
 3 fail
 15 expect() calls
Ran 6 tests across 1 file. [11.00ms]
