返回 DeepSeek-Reasonix
process-diagnostics.test.ts
根目录 / desktop / frontend / src / __tests__ / process-diagnostics.test.ts
1 import assert from "node:assert/strict";
2 import { boundedDiagnostics } from "../lib/processDiagnostics";
3
4 assert.equal(await boundedDiagnostics(async () => 42), 42);
5 assert.equal(await boundedDiagnostics(async () => { throw Error("old shell"); }), undefined);
6 assert.equal(await boundedDiagnostics(() => new Promise(() => {}), 1), undefined);
7 console.log("process diagnostics fallback tests passed");
8
8 lines TYPESCRIPT