mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 23:10:15 +00:00

- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: https://github.com/nodejs/node/pull/10036 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
18 lines
476 B
JavaScript
18 lines
476 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
const exec = require('child_process').exec;
|
|
const join = require('path').join;
|
|
|
|
const nodePath = process.argv[0];
|
|
const script = join(common.fixturesDir, 'print-10-lines.js');
|
|
|
|
const cmd = `"${nodePath}" "${script}" | head -2`;
|
|
|
|
exec(cmd, common.mustCall(function(err, stdout, stderr) {
|
|
assert.ifError(err);
|
|
const lines = stdout.split('\n');
|
|
assert.strictEqual(3, lines.length);
|
|
}));
|