test: update test/parallel/test-child-process-send-utf8.js
change var to const use arrow function in callback use strict equal PR-URL: https://github.com/nodejs/node/pull/8594 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
0718dd9f09
commit
eb31c79ce1
@ -1,14 +1,14 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var common = require('../common');
|
const common = require('../common');
|
||||||
var assert = require('assert');
|
const assert = require('assert');
|
||||||
var fork = require('child_process').fork;
|
const fork = require('child_process').fork;
|
||||||
|
|
||||||
var expected = Array(1e5).join('ßßßß');
|
const expected = Array(1e5).join('ßßßß');
|
||||||
if (process.argv[2] === 'child') {
|
if (process.argv[2] === 'child') {
|
||||||
process.send(expected);
|
process.send(expected);
|
||||||
} else {
|
} else {
|
||||||
var child = fork(process.argv[1], ['child']);
|
const child = fork(process.argv[1], ['child']);
|
||||||
child.on('message', common.mustCall(function(actual) {
|
child.on('message', common.mustCall((actual) => {
|
||||||
assert.equal(actual, expected);
|
assert.strictEqual(actual, expected);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user