| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3085714 commit f50a55d
1 file changed
| 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.register(obj, shutdown) | |
| 6 | 8 | } | |
| 7 | 9 | ||
@@ -14,5 +16,6 @@ function shutdown(obj) { | |||
| 14 | 16 | setup() | |
| 15 | 17 | ||
| 16 | 18 | process.on('exit', function () { | |
| 19 | + strictEqual(obj.foo, 'bar') | ||
| 17 | 20 | strictEqual(shutdownCalled, true) | |
| 18 | 21 | }) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments