0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-child-process-send-utf8.js
Jonathan Prince eb31c79ce1 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>
2016-09-22 10:07:59 -07:00

15 lines
399 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
const fork = require('child_process').fork;
const expected = Array(1e5).join('ßßßß');
if (process.argv[2] === 'child') {
process.send(expected);
} else {
const child = fork(process.argv[1], ['child']);
child.on('message', common.mustCall((actual) => {
assert.strictEqual(actual, expected);
}));
}