@@ -185,6 +185,7 @@ describe("run-additional-boundary-checks", () => {
|
185 | 185 | shardSpec: "4/4", |
186 | 186 | }); |
187 | 187 | expect(() => parseCliArgs(["--shard"], {})).toThrow("--shard requires a value"); |
| 188 | +expect(() => parseCliArgs(["--shard", "-h"], {})).toThrow("--shard requires a value"); |
188 | 189 | expect(() => parseCliArgs(["--wat"], {})).toThrow("Unknown argument: --wat"); |
189 | 190 | }); |
190 | 191 | |
@@ -274,7 +275,7 @@ describe("run-additional-boundary-checks", () => {
|
274 | 275 | async () => { |
275 | 276 | const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-boundary-timeout-")); |
276 | 277 | const childPidPath = path.join(tempDir, "child.pid"); |
277 | | -let childPid = 0; |
| 278 | +let childPid: number | undefined; |
278 | 279 | try { |
279 | 280 | const childScript = [ |
280 | 281 | "process.on('SIGTERM', () => {});", |
@@ -310,7 +311,7 @@ describe("run-additional-boundary-checks", () => {
|
310 | 311 | expect(result.timedOut).toBe(true); |
311 | 312 | await waitForDead(childPid, 2000); |
312 | 313 | } finally { |
313 | | -if (childPid && isProcessAlive(childPid)) { |
| 314 | +if (childPid !== undefined && isProcessAlive(childPid)) { |
314 | 315 | process.kill(childPid, "SIGKILL"); |
315 | 316 | } |
316 | 317 | fs.rmSync(tempDir, { force: true, recursive: true }); |
@@ -324,7 +325,7 @@ describe("run-additional-boundary-checks", () => {
|
324 | 325 | const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-boundary-signal-")); |
325 | 326 | const readyPath = path.join(tempDir, "ready"); |
326 | 327 | const childPidPath = path.join(tempDir, "child.pid"); |
327 | | -let childPid = 0; |
| 328 | +let childPid: number | undefined; |
328 | 329 | let runner: ReturnType<typeof spawn> | undefined; |
329 | 330 | try { |
330 | 331 | const childScript = [ |
@@ -387,7 +388,7 @@ await runChecks(
|
387 | 388 | }); |
388 | 389 | await waitForNotRunning(childPid, 2000); |
389 | 390 | } finally { |
390 | | -if (childPid && isProcessAlive(childPid)) { |
| 391 | +if (childPid !== undefined && isProcessAlive(childPid)) { |
391 | 392 | process.kill(childPid, "SIGKILL"); |
392 | 393 | } |
393 | 394 | if (runner?.pid && isProcessAlive(runner.pid)) { |
|