0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/test/known_issues/test-stdin-is-always-net.socket.js
Antoine du Hamel 6d92cc736d
test: add trailing commas in test/known_issues
PR-URL: https://github.com/nodejs/node/pull/46408
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2023-02-01 10:46:55 +01:00

24 lines
607 B
JavaScript

'use strict';
// Refs: https://github.com/nodejs/node/pull/5916
const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;
const net = require('net');
if (process.argv[2] === 'child') {
assert(process.stdin instanceof net.Socket);
return;
}
const proc = spawn(
process.execPath,
[__filename, 'child'],
{ stdio: 'ignore' },
);
// To double-check this test, set stdio to 'pipe' and uncomment the line below.
// proc.stderr.pipe(process.stderr);
proc.on('exit', common.mustCall(function(exitCode) {
assert.strictEqual(exitCode, 0);
}));