mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60759 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
585e200b40
commit
79d48f9441
57 files changed
+246
-286
No files matched your search
@@ -17,13 +17,13 @@ if (process.argv[2] === 'localhost') {
|
||||
const net = require('net');
|
||||
const server = net.createServer();
|
||||
server.listen(0);
|
||||
server.on('listening', () => {
|
||||
server.on('listening', common.mustCall(() => {
|
||||
const port = server.address().port;
|
||||
const { fork } = require('child_process');
|
||||
const child = fork(__filename, ['localhost', port], {});
|
||||
child.on('close', (exit_code) => {
|
||||
child.on('close', common.mustCall((exit_code) => {
|
||||
server.close();
|
||||
assert.strictEqual(exit_code, 0);
|
||||
});
|
||||
});
|
||||
}));
|
||||
}));
|
||||
}
|
||||
Reference in new issue
Block a user