diff --git a/harness/pstack/claude-code/skills/statechart/scripts/run.ts b/harness/pstack/claude-code/skills/statechart/scripts/run.ts index 4efd368e5..daa320468 100644 --- a/harness/pstack/claude-code/skills/statechart/scripts/run.ts +++ b/harness/pstack/claude-code/skills/statechart/scripts/run.ts @@ -212,7 +212,7 @@ async function findTlc(cwd: string) { }; } -const exitClass = (status: number | null) => +const exitClass = (status: number | null): CheckResult["exit"] => status === 0 ? 0 : status === 11 || status === 12 || status === 13 ? 1 : 2; const tail = (r: FileResult) => { diff --git a/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts b/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts index 97b71c30c..c1f6be4b7 100644 --- a/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts +++ b/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts @@ -427,8 +427,8 @@ for (const signal of ["SIGINT", "SIGTERM"] satisfies NodeJS.Signals[]) { test( `${signal} while the view draws the chart stops the command, and it writes nothing`, { timeout: 60_000 }, - () => - signalWhile(signal, (fakes) => { + async () => { + await signalWhile(signal, (fakes) => { const drawing = path.join(fakes, "drawing"); const dir = copyCase("Login", (d) => fs.writeFileSync( @@ -444,14 +444,15 @@ for (const signal of ["SIGINT", "SIGTERM"] satisfies NodeJS.Signals[]) { ), ); return { dir, reached: () => fs.existsSync(drawing) }; - }), + }); + }, ); test( `${signal} while the command writes its files stops it, and it writes nothing`, { timeout: 60_000 }, - () => - signalWhile(signal, () => ({ + async () => { + await signalWhile(signal, () => ({ dir: gridCase(150), reached: (parent) => { for (const f of fs.readdirSync(parent, { recursive: true, encoding: "utf8" })) @@ -462,7 +463,8 @@ for (const signal of ["SIGINT", "SIGTERM"] satisfies NodeJS.Signals[]) { return true; return false; }, - })), + })); + }, ); } diff --git a/pstack/skills/statechart/scripts/run.ts b/pstack/skills/statechart/scripts/run.ts index 4efd368e5..daa320468 100644 --- a/pstack/skills/statechart/scripts/run.ts +++ b/pstack/skills/statechart/scripts/run.ts @@ -212,7 +212,7 @@ async function findTlc(cwd: string) { }; } -const exitClass = (status: number | null) => +const exitClass = (status: number | null): CheckResult["exit"] => status === 0 ? 0 : status === 11 || status === 12 || status === 13 ? 1 : 2; const tail = (r: FileResult) => { diff --git a/pstack/skills/statechart/scripts/test/cli.test.ts b/pstack/skills/statechart/scripts/test/cli.test.ts index 97b71c30c..c1f6be4b7 100644 --- a/pstack/skills/statechart/scripts/test/cli.test.ts +++ b/pstack/skills/statechart/scripts/test/cli.test.ts @@ -427,8 +427,8 @@ for (const signal of ["SIGINT", "SIGTERM"] satisfies NodeJS.Signals[]) { test( `${signal} while the view draws the chart stops the command, and it writes nothing`, { timeout: 60_000 }, - () => - signalWhile(signal, (fakes) => { + async () => { + await signalWhile(signal, (fakes) => { const drawing = path.join(fakes, "drawing"); const dir = copyCase("Login", (d) => fs.writeFileSync( @@ -444,14 +444,15 @@ for (const signal of ["SIGINT", "SIGTERM"] satisfies NodeJS.Signals[]) { ), ); return { dir, reached: () => fs.existsSync(drawing) }; - }), + }); + }, ); test( `${signal} while the command writes its files stops it, and it writes nothing`, { timeout: 60_000 }, - () => - signalWhile(signal, () => ({ + async () => { + await signalWhile(signal, () => ({ dir: gridCase(150), reached: (parent) => { for (const f of fs.readdirSync(parent, { recursive: true, encoding: "utf8" })) @@ -462,7 +463,8 @@ for (const signal of ["SIGINT", "SIGTERM"] satisfies NodeJS.Signals[]) { return true; return false; }, - })), + })); + }, ); }