Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/unit/instrumentation-crash-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe("registerCrashDiagnostics", () => {
// fatal 路径必须写出同步 stderr 兜底诊断,防止回归静默吞掉致命错误
expect(stderrSpy).toHaveBeenCalled();
expect(process.report?.excludeEnv).toBe(true);
const reportCalls = (process.report?.writeReport as unknown as ReturnType<typeof vi.fn>).mock
const reportCalls = (process.report.writeReport as unknown as ReturnType<typeof vi.fn>).mock
.calls;
expect(reportCalls[0]?.[1]).toBe(error);
});
Expand All @@ -146,7 +146,7 @@ describe("registerCrashDiagnostics", () => {

uncaughtException(error);

const reportCalls = (process.report?.writeReport as unknown as ReturnType<typeof vi.fn>).mock
const reportCalls = (process.report.writeReport as unknown as ReturnType<typeof vi.fn>).mock
.calls;
const reportError = reportCalls[0]?.[1] as Error;
expect(reportError).not.toBe(error);
Expand Down