blob: 300551ce678be17f4f723091b9732de7066b5dc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
'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)');
}
|