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

Function assertTargetAttachedState

test/parallel/test-inspector-worker-target.js:26–33  ·  view source on GitHub ↗
(session, targetId, attached)

Source from the content-addressed store, hash-verified

24}
25
26async function assertTargetAttachedState(session, targetId, attached) {
27 const { targetInfos } = await session.send({ method: 'Target.getTargets' });
28 const targetInfo = targetInfos.find((target) => {
29 return target.targetId === targetId;
30 });
31 assert.notStrictEqual(targetInfo, undefined);
32 assert.strictEqual(targetInfo.attached, attached);
33}
34
35async function test(isSetAutoAttachBeforeExecution) {
36 const child = new NodeInstance(['--inspect-brk=0', '--experimental-worker-inspection'],

Callers 1

testFunction · 0.85

Calls 2

sendMethod · 0.65
findMethod · 0.65

Tested by 1

testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…