Files
AgentCompany/tests/e2e/e2e-global-setup.ts
T
2026-03-18 01:15:58 -04:00

15 lines
442 B
TypeScript

import { execFileSync } from "node:child_process";
/**
* Playwright globalSetup: build the Electron app from source before E2E tests.
* Uses execFileSync and enables shell mode on Windows so the pnpm shim resolves correctly.
*/
export default function globalSetup() {
execFileSync("pnpm", ["electron-vite", "build"], {
stdio: "inherit",
cwd: process.cwd(),
timeout: 120_000,
shell: process.platform === "win32",
});
}