MCPcopy Index your code
hub / github.com/nodejs/node / setupWorker

Function setupWorker

test/parallel/test-cluster-dgram-1.js:79–90  ·  view source on GitHub ↗
(worker)

Source from the content-addressed store, hash-verified

77 }
78
79 function setupWorker(worker) {
80 let received = 0;
81
82 worker.on('message', common.mustCall((msg) => {
83 received = msg.received;
84 worker.disconnect();
85 }));
86
87 worker.on('exit', common.mustCall(() => {
88 assert.strictEqual(received, PACKETS_PER_WORKER);
89 }));
90 }
91}
92
93

Callers 1

primaryFunction · 0.70

Calls 2

disconnectMethod · 0.65
onMethod · 0.45

Tested by

no test coverage detected