diff --git a/tests/unit/service-worker-runtime.test.ts b/tests/unit/service-worker-runtime.test.ts index 930496cc..a88e9a57 100644 --- a/tests/unit/service-worker-runtime.test.ts +++ b/tests/unit/service-worker-runtime.test.ts @@ -2007,6 +2007,9 @@ describe("SW-01 the activation marker read is bounded in bytes", () => { // 1101/10-07. The read deadline is the runtime's own 5 s constant. The // clock is faked, so the test passes the deadline instead of waiting it // out; without a deadline the activation never settles and this fails. + // 1106/06-02. This fixture has one cache, the current one, so activation + // reads one marker and waits for one deadline. The clock advances exactly + // 5 s once: a longer deadline, even by 1 ms, leaves it unsettled here. vi.useFakeTimers(); try { let cancels = 0; @@ -2026,10 +2029,7 @@ describe("SW-01 the activation marker read is bounded in bytes", () => { .finally(() => { settled = true; }); - // One read deadline per marker probe. - for (let probe = 0; probe < 4 && !settled; probe += 1) { - await vi.advanceTimersByTimeAsync(5_000); - } + await vi.advanceTimersByTimeAsync(5_000); expect(settled).toBe(true); await expect(activation).resolves.toBeTypeOf("number");