mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
ESLint 2.1.0 is coming. Some lint rules have been tightened. PR-URL: https://github.com/nodejs/node/pull/5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
25 lines
746 B
JavaScript
25 lines
746 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const args = ['--debug', `--debug-port=${common.PORT}`, '--interactive'];
|
|
const proc = spawn(process.execPath, args, { stdio: 'pipe' });
|
|
proc.stdin.write(`
|
|
util.inspect(Promise.resolve(42));
|
|
util.inspect(Promise.resolve(1337));
|
|
.exit
|
|
`);
|
|
proc.on('exit', common.mustCall((exitCode, signalCode) => {
|
|
assert.strictEqual(exitCode, 0);
|
|
assert.strictEqual(signalCode, null);
|
|
}));
|
|
let stdout = '';
|
|
proc.stdout.setEncoding('utf8');
|
|
proc.stdout.on('data', (data) => stdout += data);
|
|
process.on('exit', () => {
|
|
assert(stdout.includes('Promise { 42 }'));
|
|
assert(stdout.includes('Promise { 1337 }'));
|
|
});
|