From 7639454305ef64ad5a1a446bb167a6bc59fa35ec Mon Sep 17 00:00:00 2001 From: Joseph Dale Banares Date: Wed, 21 Oct 2026 03:07:09 +0800 Subject: [PATCH] test(layout): give the large-diagram timing check room for slow CI runners --- packages/layout/test/layout.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/layout/test/layout.test.ts b/packages/layout/test/layout.test.ts index 48d3207..5394d71 100644 --- a/packages/layout/test/layout.test.ts +++ b/packages/layout/test/layout.test.ts @@ -224,7 +224,8 @@ describe('layoutDiagram', () => { const groups = Array.from({ length: 8 }, (_, i) => ({ id: `g${i}`, label: `G${i}` })); const started = performance.now(); const out = await layoutDiagram(draft({ direction: 'RIGHT', groups, nodes, edges })); - expect(performance.now() - started).toBeLessThan(4_000); + // CI runners are several times slower than a laptop (3-5s there); the old multi-pass path is still well past this. + expect(performance.now() - started).toBeLessThan(15_000); // Wrapped rather than one long strip, and every card placed apart from the others. expect(out.bounds.width).toBeLessThan(out.bounds.height * 4); const rects = Object.values(out.nodes);