xref: /third_party/node/test/fixtures/child-process-spawn-node.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/
11cb0ef41Sopenharmony_ciconst assert = require('assert');
21cb0ef41Sopenharmony_ciconst debug = require('util').debuglog('test');
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_cifunction onmessage(m) {
51cb0ef41Sopenharmony_ci  debug('CHILD got message:', m);
61cb0ef41Sopenharmony_ci  assert.ok(m.hello);
71cb0ef41Sopenharmony_ci  process.removeListener('message', onmessage);
81cb0ef41Sopenharmony_ci}
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ciprocess.on('message', onmessage);
111cb0ef41Sopenharmony_ciprocess.send({ foo: 'bar' });
12

Indexes created Thu Nov 07 10:32:03 CST 2024