INNER CODE UNIT · TypeScript
Promise
SveltyCMS/SveltyCMS · scripts/benchmark-matrix/index.ts:432
return new Promise((resolve) => {
const testStartTime = performance.now();
const p = spawn("bun", ["test", `tests/benchmarks/${file}`, "--timeout", "300000"], {
stdio: ["inherit", "pipe", "pipe"],
shell: process.platform === "win32",
env: {
...serverEnv,
API_BASE_URL: baseUrl,
BENCHMARK_MATRIX: "1",
BENCHMARK_RUN_ID: runId,
// 🏷️ Production-mode marker for the benchmark server (bun test overrides
// NODE_ENV/TEST_MODE in child processes, so this survives as the signal)
SVELTY_BENCHMARK_SERVER_MODE: serverEnv.NODE_ENV || "production",
} as Record<string, string>,
});
let output = "";
p.stdout.on("data", (d: Buffer) => {