summaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-stdout-flush-exit.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-child-process-stdout-flush-exit.js')
-rw-r--r--test/parallel/test-child-process-stdout-flush-exit.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/parallel/test-child-process-stdout-flush-exit.js b/test/parallel/test-child-process-stdout-flush-exit.js
index b76a7cb5e5..9db74b51ce 100644
--- a/test/parallel/test-child-process-stdout-flush-exit.js
+++ b/test/parallel/test-child-process-stdout-flush-exit.js
@@ -1,23 +1,23 @@
'use strict';
-var common = require('../common');
-var assert = require('assert');
+const common = require('../common');
+const assert = require('assert');
// if child process output to console and exit
if (process.argv[2] === 'child') {
console.log('hello');
- for (var i = 0; i < 200; i++) {
+ for (let i = 0; i < 200; i++) {
console.log('filler');
}
console.log('goodbye');
process.exit(0);
} else {
// parent process
- var spawn = require('child_process').spawn;
+ const spawn = require('child_process').spawn;
// spawn self as child
- var child = spawn(process.argv[0], [process.argv[1], 'child']);
+ const child = spawn(process.argv[0], [process.argv[1], 'child']);
- var stdout = '';
+ let stdout = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', function(data) {
@@ -32,7 +32,7 @@ if (process.argv[2] === 'child') {
});
child.on('close', common.mustCall(function() {
- assert.equal(stdout.slice(0, 6), 'hello\n');
- assert.equal(stdout.slice(stdout.length - 8), 'goodbye\n');
+ assert.strictEqual(stdout.slice(0, 6), 'hello\n');
+ assert.strictEqual(stdout.slice(stdout.length - 8), 'goodbye\n');
}));
}