Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 22226fa

Browse filesBrowse files
furnoxMylesBorins
authored andcommitted
test: refactoring test-pipe-head
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
1 parent 11115c0 commit 22226fa
Copy full SHA for 22226fa

File tree

Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-pipe-head.js‎

Copy file name to clipboard
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
2+
const common = require('../common');
3+
const assert = require('assert');
44

5-
var exec = require('child_process').exec;
6-
var join = require('path').join;
5+
const exec = require('child_process').exec;
6+
const join = require('path').join;
77

8-
var nodePath = process.argv[0];
9-
var script = join(common.fixturesDir, 'print-10-lines.js');
8+
const nodePath = process.argv[0];
9+
const script = join(common.fixturesDir, 'print-10-lines.js');
1010

11-
var cmd = '"' + nodePath + '" "' + script + '" | head -2';
11+
const cmd = `"${nodePath}" "${script}" | head -2`;
1212

1313
exec(cmd, common.mustCall(function(err, stdout, stderr) {
14-
if (err) throw err;
15-
var lines = stdout.split('\n');
16-
assert.equal(3, lines.length);
14+
assert.ifError(err);
15+
const lines = stdout.split('\n');
16+
assert.strictEqual(3, lines.length);
1717
}));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.