diff --git a/packages/signals/tests/attribution.test.ts b/packages/signals/tests/attribution.test.ts index 84d1a3735d..c3edb78859 100644 --- a/packages/signals/tests/attribution.test.ts +++ b/packages/signals/tests/attribution.test.ts @@ -503,9 +503,12 @@ describe("why-did-this-run attribution", () => { while (performance.now() < end); }; const [n, setN] = createSignal(0, { name: "n" }); + // 40 ms, not 10: self-times are wall-clock, and on a loaded CI runner a + // scheduling pause inside the cheap effect measured 17.9 ms against the + // memo's 10.1 ms. The ranking asserted below needs the gap to be wide. const slow = createMemo( () => { - spin(10); + spin(40); return n(); }, { name: "slow-memo" } diff --git a/packages/signals/tests/treeshake.test.ts b/packages/signals/tests/treeshake.test.ts index 9b7780b324..630bcefdd8 100644 --- a/packages/signals/tests/treeshake.test.ts +++ b/packages/signals/tests/treeshake.test.ts @@ -67,7 +67,10 @@ function retainedFrom(retained: string[], names: string[]): string[] { return names.filter(name => retained.some(id => id.includes(name))); } -describe("pay-for-use tree-shaking (#2883)", () => { +// Every test runs a full Vite build of a fixture, and the first one pays the +// bundler's cold start: under the whole suite's load on CI it ran past +// vitest's 5 s default (5,295 ms) while asserting nothing wrong. +describe("pay-for-use tree-shaking (#2883)", { timeout: 30_000 }, () => { it("core floor sheds every optional feature module", async () => { const { minifiedBytes, retained } = await bundleFixture( `export { createSignal, createMemo, createEffect, createRoot, flush } from "sigsrc";`