mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
d0c0e20bc2
PR-URL: https://github.com/nodejs/node/pull/32078 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
12 lines
278 B
JavaScript
12 lines
278 B
JavaScript
const assert = require('assert');
|
|
const debug = require('util').debuglog('test');
|
|
|
|
function onmessage(m) {
|
|
debug('CHILD got message:', m);
|
|
assert.ok(m.hello);
|
|
process.removeListener('message', onmessage);
|
|
}
|
|
|
|
process.on('message', onmessage);
|
|
process.send({ foo: 'bar' });
|