From f598b3b78d97494f5a7d42bd3a4d9fd458202478 Mon Sep 17 00:00:00 2001 From: quality Date: Thu, 8 Oct 2026 00:46:25 -0400 Subject: [PATCH] test: give the remarkStripMdxJs warm-up hook headroom under worker contention The beforeAll that loads the MDX toolchain ran with a 30s hookTimeout. Alone it takes ~8s, but with every test file in its own isolated worker on a saturated host it exceeded 30s and failed the whole file (and with it the coverage report). Raise it to 120s: the hook guards against a hang, not a slow box. Closes #269 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality --- src/__tests__/remarkStripMdxJs.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/__tests__/remarkStripMdxJs.test.ts b/src/__tests__/remarkStripMdxJs.test.ts index b949075..bc7ac70 100644 --- a/src/__tests__/remarkStripMdxJs.test.ts +++ b/src/__tests__/remarkStripMdxJs.test.ts @@ -65,12 +65,14 @@ const SPREAD_ATTRIBUTE = `# Title\n\n
{ ${record("spread")}; retu describe("remarkStripMdxJs", () => { // The first compileMdx call loads the MDX toolchain; keep that cost out of - // the per-test timeout. + // the per-test timeout. Alone this takes ~8s, but with every test file in + // its own worker on a saturated host it has exceeded 30s, so give the + // warm-up generous headroom — it guards against a hang, not a slow box. beforeAll(async () => { await compileMdx("# warm up", { mdxOptions: { remarkPlugins: [], rehypePlugins: [] }, }); - }, 30_000); + }, 120_000); beforeEach(() => { delete g.__mdxProbe;