From e8f4a9aa3ca15081f295525b3a3aa785bd41a38e Mon Sep 17 00:00:00 2001 From: Anton Wiklund Date: Sun, 1 Nov 2026 18:31:53 +0100 Subject: [PATCH] test(solid): give the many decks and agents growth tests 180 s The toDecks and readDeckFile growth tests of GHSA-hcrw-cr33-jg78 map or parse thousands of decks many times over: about 6 and 8 seconds with every package's tests on a laptop, and many times that in CI, coverage on and every package's tests run at once on two cores. There toDecks' test passed the 60 s default and failed, though its ratio was not the matter. What the tests hold to is the ratio of CPU time; the clock only stops a test that never ends, as the card writes' growth tests already say with the same 180 s. --- packages/solid/src/mappers/deckMapper.test.ts | 7 ++++++- packages/solid/src/solidDeckArchive.test.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/solid/src/mappers/deckMapper.test.ts b/packages/solid/src/mappers/deckMapper.test.ts index 331a8533..834fb1e5 100644 --- a/packages/solid/src/mappers/deckMapper.test.ts +++ b/packages/solid/src/mappers/deckMapper.test.ts @@ -388,7 +388,12 @@ describe("toDeck", () => { }); describe("toDecks over many decks and agents", () => { - it("takes time that grows with them, not their product (GHSA-hcrw-cr33-jg78)", () => { + // Thousands of decks, mapped many times over: seconds on a laptop, and many + // times that in CI, coverage on and every package's tests run at once. What + // is held to is the ratio, of CPU time; the clock only stops a test that never ends. + it("takes time that grows with them, not their product (GHSA-hcrw-cr33-jg78)", { + timeout: 180_000, + }, () => { const ratio = growth( (count) => { const subjects = Array.from({ length: count }, (_, i) => [ diff --git a/packages/solid/src/solidDeckArchive.test.ts b/packages/solid/src/solidDeckArchive.test.ts index 600f7cf8..69514e5f 100644 --- a/packages/solid/src/solidDeckArchive.test.ts +++ b/packages/solid/src/solidDeckArchive.test.ts @@ -322,7 +322,12 @@ describe("readDeckFile", () => { expect(agentNamesOf).not.toHaveBeenCalled(); }); - it("refuses a file of many decks and agents in time that grows with them, not their product (GHSA-hcrw-cr33-jg78)", async () => { + // Thousands of decks, parsed many times over: seconds on a laptop, and many + // times that in CI, coverage on and every package's tests run at once. What + // is held to is the ratio, of CPU time; the clock only stops a test that never ends. + it("refuses a file of many decks and agents in time that grows with them, not their product (GHSA-hcrw-cr33-jg78)", { + timeout: 180_000, + }, async () => { const ratio = await growthAsync( (count) => { let text = PREFIXES;