diff --git a/backend/__tests__/routes/slideshowAdmin.test.js b/backend/__tests__/routes/slideshowAdmin.test.js index 45c08fbe..ca277004 100644 --- a/backend/__tests__/routes/slideshowAdmin.test.js +++ b/backend/__tests__/routes/slideshowAdmin.test.js @@ -57,6 +57,9 @@ async function insertEvent(db, adminId, over = {}) { describe('admin Live Slideshow endpoints', () => { let db; let cleanup; let app; let adminId; let token; + // Match slideshowPublic.test.js — bootCrmDb's full migration run intermittently + // exceeds Jest's default 5s `beforeAll` timeout on slower CI runners; raise + // it so this doesn't block PRs. beforeAll(async () => { ({ db, cleanup } = await bootCrmDb()); ({ adminId } = await seedMinimal(db)); @@ -72,7 +75,7 @@ describe('admin Live Slideshow endpoints', () => { app.use((err, req, res, next) => { res.status(err.statusCode || err.status || 500).json({ error: err.message, code: err.code }); }); - }); + }, 30000); afterAll(async () => { await cleanup(); }); diff --git a/backend/__tests__/routes/slideshowPublic.test.js b/backend/__tests__/routes/slideshowPublic.test.js index 64e1d185..5bb6633a 100644 --- a/backend/__tests__/routes/slideshowPublic.test.js +++ b/backend/__tests__/routes/slideshowPublic.test.js @@ -67,6 +67,11 @@ async function insertEvent(db, over = {}) { describe('public Live Slideshow routes', () => { let db; let cleanup; let app; + // bootCrmDb runs the full migration set against a fresh SQLite file, which + // takes <2s locally but has been observed to exceed Jest's default 5s + // `beforeAll` timeout on slower GitHub Actions runners (~5.4s — runner-to- + // runner I/O variance). Raise the hook timeout so this doesn't intermittently + // block PRs on CI; doesn't affect happy-path local runs. beforeAll(async () => { ({ db, cleanup } = await bootCrmDb()); await seedMinimal(db); @@ -81,7 +86,7 @@ describe('public Live Slideshow routes', () => { app.use((err, req, res, next) => { res.status(err.statusCode || err.status || 500).json({ error: err.message, code: err.code }); }); - }); + }, 30000); afterAll(async () => { await cleanup(); });