From f56bdde27679e1f05b34d2cf5efbc6e49bd4c2ca Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Sun, 12 Jul 2026 22:32:14 +0000 Subject: [PATCH] test: stabilize artifact pagination coverage --- tests/artifactComparison.test.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/artifactComparison.test.ts b/tests/artifactComparison.test.ts index fd06838d1..a77d525f6 100644 --- a/tests/artifactComparison.test.ts +++ b/tests/artifactComparison.test.ts @@ -119,11 +119,14 @@ describe("artifact comparison", () => { it("assembles bounded page sets for graphs larger than one page", async () => { const root = await mkdtemp(join(tmpdir(), "rea-artifact-pages-")); - for (let index = 0; index < 501; index += 1) - await writeFile( - join(root, `file-${String(index).padStart(3, "0")}.txt`), - String(index), - ); + await Promise.all( + Array.from({ length: 501 }, async (_, index) => + writeFile( + join(root, `file-${String(index).padStart(3, "0")}.txt`), + String(index), + ), + ), + ); const pages = await Promise.all([ observe(root), observe(root, { @@ -137,7 +140,7 @@ describe("artifact comparison", () => { summary: { unchanged: 502, unknown: 0 }, changes: { total: 0 }, }); - }); + }, 15_000); it("rejects non-inventory and tampered Evidence", async () => { const root = await mkdtemp(join(tmpdir(), "rea-artifact-invalid-"));