summaryrefslogtreecommitdiff
path: root/std/node/process_exit_test.ts
blob: 54c8bcc01bb40f4c2ad00b31210df8f30cf1594c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import "./global.ts";

//deno-lint-ignore no-undef
process.on("exit", () => {
  console.log(1);
});

function unexpected() {
  console.log(null);
}
//deno-lint-ignore no-undef
process.on("exit", unexpected);
//deno-lint-ignore no-undef
process.removeListener("exit", unexpected);

//deno-lint-ignore no-undef
process.on("exit", () => {
  console.log(2);
});