ai-chatbot/scripts/run-playwright.mjs
Codex 9155682238 chore(repo): make the recovered production baseline portable
Record source and release ownership, keep source line endings consistent,
and exclude local build/config backups from version control.

Restore default Next type paths, normalize CI checks across line endings,
and use portable Playwright and postbuild entry points on Windows/Linux.
Align the stale timeout fixture with the existing production timeout policy.

Application runtime files remain identical to production-snapshot-48-20261030.
Production build and focused regressions passed; pre-existing full-repository
lint findings remain documented instead of relaxing lint rules.
2026-10-30 16:19:08 +08:00

33 lines
659 B
JavaScript

#!/usr/bin/env node
import { spawn } from "node:child_process";
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const child = spawn(
process.execPath,
[
...process.execArgv,
require.resolve("@playwright/test/cli"),
"test",
...process.argv.slice(2),
],
{
env: { ...process.env, PLAYWRIGHT: "True" },
stdio: "inherit",
},
);
for (const signal of ["SIGINT", "SIGTERM"]) {
process.on(signal, () => child.kill(signal));
}
child.on("error", (error) => {
console.error(error.message);
process.exitCode = 1;
});
child.on("exit", (code) => {
process.exitCode = code ?? 1;
});