diff --git a/apps/guides/__tests__/og-image.test.ts b/apps/guides/__tests__/og-image.test.ts index c910e48988..418ea2d9b8 100644 --- a/apps/guides/__tests__/og-image.test.ts +++ b/apps/guides/__tests__/og-image.test.ts @@ -28,12 +28,14 @@ function assertValidPng(filePath: string): void { } describe('guides OG image generation', () => { + // Generating per-post PNGs takes ~30-60s for the full set; + // default vitest hook timeout is 5s. beforeAll(() => { execSync('bun run scripts/generate-og-images.ts', { cwd: APP_DIR, stdio: 'inherit', }); - }); + }, 180_000); it('generates public/og-image.png', () => { expect(fs.existsSync(ROOT_OG_PATH)).toBe(true); diff --git a/apps/guides/package.json b/apps/guides/package.json index d8e0ffd7af..c973c2d772 100644 --- a/apps/guides/package.json +++ b/apps/guides/package.json @@ -3,7 +3,7 @@ "version": "2.0.25", "private": true, "scripts": { - "build": "bun run generate-og-images && bun run build-content && next build", + "build": "bun run build-content && bun run generate-og-images && next build", "build-content": "bun run scripts/build-content.ts", "clean": "bunx rimraf .next node_modules out", "demo-enhancement": "bun run scripts/demo-enhancement.ts",