mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
b80ab31124
Cleanup hooks are called before the environment shutdown finalizer invocations. PR-URL: https://github.com/nodejs/node/pull/46692 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
14 lines
499 B
JavaScript
14 lines
499 B
JavaScript
'use strict';
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
const child_process = require('child_process');
|
|
|
|
if (process.argv[2] === 'child') {
|
|
require(`./build/${common.buildType}/binding`);
|
|
} else {
|
|
const { stdout, status, signal } =
|
|
child_process.spawnSync(process.execPath, [__filename, 'child']);
|
|
assert.strictEqual(status, 0, `process exited with status(${status}) and signal(${signal})`);
|
|
assert.strictEqual(stdout.toString().trim(), 'cleanup(42)');
|
|
}
|