Files
scriptc/tests/corpus/1024-async-pending-exit.ts
2026-07-22 18:08:04 -05:00

10 lines
325 B
TypeScript

// A promise nobody resolves: Node exits 0 when the loop drains even with
// suspended awaits (the classic gotcha) — matched exactly.
async function waitsForever(): Promise<void> {
console.log("suspending");
await new Promise<void>(() => {});
console.log("never resumes");
}
waitsForever();
console.log("main done");