()
| 10 | const assert = require('node:assert'); |
| 11 | |
| 12 | async function test() { |
| 13 | const worker = new Worker(__filename, { workerData: { children: true } }); |
| 14 | |
| 15 | await assert.rejects(common.mustCall(function() { |
| 16 | return postMessageToThread(worker.threadId); |
| 17 | }), { |
| 18 | name: 'Error', |
| 19 | code: 'ERR_WORKER_MESSAGING_ERRORED', |
| 20 | }); |
| 21 | |
| 22 | worker.postMessage('success'); |
| 23 | } |
| 24 | |
| 25 | if (!workerData?.children) { |
| 26 | test(); |
no test coverage detected
searching dependent graphs…