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 4efdbaf

Browse filesBrowse files
malenesok007MylesBorins
authored andcommitted
test: refactor test-child-process-ipc
Change var to const or let. Change assert.equal() to assert.strictEqual(). PR-URL: #9990 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent dbfec29 commit 4efdbaf
Copy full SHA for 4efdbaf

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-child-process-ipc.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-ipc.js
+10-9Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
42

5-
var spawn = require('child_process').spawn;
3+
const common = require('../common');
4+
const assert = require('assert');
65

7-
var path = require('path');
6+
const spawn = require('child_process').spawn;
87

9-
var sub = path.join(common.fixturesDir, 'echo.js');
8+
const path = require('path');
109

11-
var gotHelloWorld = false;
12-
var gotEcho = false;
10+
const sub = path.join(common.fixturesDir, 'echo.js');
1311

14-
var child = spawn(process.argv[0], [sub]);
12+
let gotHelloWorld = false;
13+
let gotEcho = false;
14+
15+
const child = spawn(process.argv[0], [sub]);
1516

1617
child.stderr.on('data', function(data) {
1718
console.log('parent stderr: ' + data);
@@ -23,7 +24,7 @@ child.stdout.on('data', function(data) {
2324
console.log('child said: ' + JSON.stringify(data));
2425
if (!gotHelloWorld) {
2526
console.error('testing for hello world');
26-
assert.equal('hello world\r\n', data);
27+
assert.strictEqual('hello world\r\n', data);
2728
gotHelloWorld = true;
2829
console.error('writing echo me');
2930
child.stdin.write('echo me\r\n');

0 commit comments

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