mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 00:53:28 +00:00
chore: Fix types in tests 33/N.
This commit is contained in:
@@ -16,10 +16,11 @@ describe("installUnhandledRejectionHandler - fatal detection", () => {
|
||||
beforeEach(() => {
|
||||
exitCalls = [];
|
||||
|
||||
vi.spyOn(process, "exit").mockImplementation((code: string | number | null | undefined) => {
|
||||
vi.spyOn(process, "exit").mockImplementation((code?: string | number | null): never => {
|
||||
if (code !== undefined && code !== null) {
|
||||
exitCalls.push(code);
|
||||
}
|
||||
throw new Error("process.exit");
|
||||
});
|
||||
|
||||
consoleErrorSpy = vi.spyOn(console, "error").mockImplementation(() => {});
|
||||
|
||||
Reference in New Issue
Block a user