| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,9 @@ | |||
| 1 | 1 | import { strictEqual } from 'assert' | |
| 2 | 2 | ||
| 3 | + let obj | ||
| 4 | + | ||
| 3 | 5 | function setup() { | |
| 4 | - const obj = { foo: 'bar' } | ||
| 6 | + obj = { foo: 'bar' } | ||
| 5 | 7 | process.finalization.registerBeforeExit(obj, shutdown) | |
| 6 | 8 | } | |
| 7 | 9 | ||
@@ -27,5 +29,6 @@ function shutdown(obj, event) { | |||
| 27 | 29 | setup() | |
| 28 | 30 | ||
| 29 | 31 | process.on('exit', function () { | |
| 32 | + strictEqual(obj.foo, 'bar') | ||
| 30 | 33 | strictEqual(shutdownCalled, true) | |
| 31 | 34 | }) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments