Skip to content

Commit fc8ded3

Browse files
benvinegarclaude
andcommitted
test(e2e): build the embed bundle in globalSetup
The embed e2e mounts viewer/dist-embed/engine.js, but globalSetup only built viewer/dist — so CI (clean checkout, no prior build:embed) failed with ENOENT on the engine bundle. Build dist-embed in globalSetup too, alongside the viewer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 56d47bf commit fc8ded3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

e2e/globalSetup.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { execSync } from "node:child_process";
22
import { fileURLToPath } from "node:url";
33

44
// Each test boots `node server/index.ts`, which serves viewer/dist/index.html
5-
// read at startup — build the viewer once before the suite runs.
5+
// read at startup — build the viewer once before the suite runs. The embed e2e
6+
// also mounts the embeddable engine bundle (viewer/dist-embed), so build that too.
67
export default function globalSetup() {
7-
execSync("npx vite build", {
8-
cwd: fileURLToPath(new URL("..", import.meta.url)),
9-
stdio: "inherit",
10-
});
8+
const cwd = fileURLToPath(new URL("..", import.meta.url));
9+
execSync("npx vite build", { cwd, stdio: "inherit" });
10+
execSync("npx vite build -c viewer/vite.embed.config.ts", { cwd, stdio: "inherit" });
1111
}

0 commit comments

Comments
 (0)