Files
scriptc/tests/corpus/1446-exit-uncaught.ts
2026-07-22 18:08:04 -05:00

10 lines
329 B
TypeScript

// @exit: 1
// An uncaught throw exits 1 — and the 'exit' listeners still run and see
// that code (Node runs them on the fatal-exception path; stderr carries
// the report and is not compared, stdout is).
process.on("exit", (code) => {
console.log("exit saw", code);
});
console.log("before boom");
throw new Error("boom");