From 4e5cffe4c99e57793f7c5cacdb58c03142314a2a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 19 Feb 2026 08:24:50 +0000 Subject: [PATCH] test: fix flaky run-node spawn side-effects --- src/infra/run-node.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/infra/run-node.test.ts b/src/infra/run-node.test.ts index 72713220c..fab1d7e77 100644 --- a/src/infra/run-node.test.ts +++ b/src/infra/run-node.test.ts @@ -1,3 +1,4 @@ +import fsSync from "node:fs"; import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; @@ -26,9 +27,9 @@ describe("run-node script", () => { const nodeCalls: string[][] = []; const spawn = (cmd: string, args: string[]) => { if (cmd === "pnpm") { - void fs.writeFile(argsPath, args.join(" "), "utf-8"); + fsSync.writeFileSync(argsPath, args.join(" "), "utf-8"); if (!args.includes("--no-clean")) { - void fs.rm(path.join(tmp, "dist", "control-ui"), { recursive: true, force: true }); + fsSync.rmSync(path.join(tmp, "dist", "control-ui"), { recursive: true, force: true }); } } if (cmd === process.execPath) {