0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/test/known_issues/test-stdin-is-always-net.socket.js
Sakthipriyan Vairamani 854f758169 test: fix offending max-len linter error
Refer: https://github.com/nodejs/node/pull/5935
PR-URL: https://github.com/nodejs/node/pull/5980
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Phillip Johnsen <johphi@gmail.com>
2016-04-01 02:47:40 +05:30

20 lines
592 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) {
process.exitCode = exitCode;
}));