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

Function interruptingJS

test/report/test-report-worker.js:33–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33async function interruptingJS() {
34 // Test that the report also works when Worker threads are busy in JS land.
35
36 const w = new Worker('while (true);', { eval: true });
37
38 await once(w, 'online');
39
40 const report = process.report.getReport();
41 helper.validateContent(report);
42 assert.strictEqual(report.workers.length, 1);
43 helper.validateContent(report.workers[0]);
44
45 await w.terminate();
46}
47
48(async function() {
49 await basic();

Callers 1

Calls 2

terminateMethod · 0.95
onceFunction · 0.50

Tested by

no test coverage detected