blob: c5a492285d1b77dacfc7f4009c60cdc465fee35e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
process.on("beforeExit", () => {
throw new Error("process.on('beforeExit') called");
});
if (process._exiting) {
throw new Error("process._exiting should be undefined");
}
process.on("exit", () => {
if (!process._exiting) {
throw new Error("process.on('exit') called with process._exiting false");
}
console.log("PASS");
});
process.exit(0);
|