test: tighten assertions and harness coverage

This commit is contained in:
Peter Steinberger
2026-05-08 05:27:57 +01:00
parent f62618f805
commit 9ef37d1907
822 changed files with 8918 additions and 6533 deletions

View File

@@ -21,9 +21,11 @@ describe("restart-helper", () => {
async function prepareAndReadScript(env: Record<string, string>, gatewayPort = 18789) {
const scriptPath = await prepareRestartScript(env, gatewayPort);
expect(scriptPath).toBeTruthy();
const content = await fs.readFile(scriptPath!, "utf-8");
return { scriptPath: scriptPath!, content };
if (scriptPath === undefined) {
throw new Error("expected restart script path");
}
const content = await fs.readFile(scriptPath, "utf-8");
return { scriptPath, content };
}
async function cleanupScript(scriptPath: string) {