test: fix typo

PR-URL: https://github.com/nodejs/node/pull/15938
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Oscar Funes 2017-10-06 10:25:26 -07:00 committed by Ruben Bridgewater
parent 3b90bd006f
commit f720b82e39
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -74,17 +74,17 @@ if (process.argv[2] === 'pipe') {
child.stdout.pipe(process.stdout, { end: false });
let childSending = false;
let childReciveing = false;
let childReceiving = false;
child.on('message', function(message) {
if (childSending === false) {
childSending = (message === 'message from child');
}
if (childReciveing === false) {
childReciveing = (message === 'got message from master');
if (childReceiving === false) {
childReceiving = (message === 'got message from master');
}
if (childReciveing === true) {
if (childReceiving === true) {
child.kill();
}
});
@ -102,6 +102,6 @@ if (process.argv[2] === 'pipe') {
// Check message system
assert.ok(childSending, 'The child was able to send a message');
assert.ok(childReciveing, 'The child was able to receive a message');
assert.ok(childReceiving, 'The child was able to receive a message');
});
}