mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:10:49 +00:00
fix(test): include vitest lane labels in timeout logs
This commit is contained in:
@@ -97,4 +97,28 @@ describe("scripts/run-vitest", () => {
|
||||
vi.useRealTimers();
|
||||
}
|
||||
});
|
||||
|
||||
it("includes the runner label in watchdog logs when provided", () => {
|
||||
vi.useFakeTimers();
|
||||
try {
|
||||
const stdout = new EventEmitter();
|
||||
const logSpy = vi.fn();
|
||||
|
||||
installVitestNoOutputWatchdog({
|
||||
streams: [stdout],
|
||||
timeoutMs: 1000,
|
||||
forceKillAfterMs: 0,
|
||||
label: "run --config test/vitest/vitest.secrets.config.ts",
|
||||
log: logSpy,
|
||||
onTimeout: () => {},
|
||||
});
|
||||
|
||||
vi.advanceTimersByTime(1000);
|
||||
expect(logSpy).toHaveBeenCalledWith(
|
||||
"[vitest] no output for 1000ms; terminating stalled Vitest process group (run --config test/vitest/vitest.secrets.config.ts).",
|
||||
);
|
||||
} finally {
|
||||
vi.useRealTimers();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user