Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: use string interpolation and assert.ifError
  • Loading branch information
tlb committed Dec 22, 2016
commit 3eeb2bb6114bec1df169bfe98e63dfc1bab6e20b
4 changes: 2 additions & 2 deletions test/parallel/test-pipe-head.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ 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';
const cmd = `"${nodePath}" "${script}" | head -2`;

exec(cmd, common.mustCall(function(err, stdout, stderr) {
if (err) throw err;
assert.ifError(err);
const lines = stdout.split('\n');
assert.strictEqual(3, lines.length);
}));