MCPcopy Create free account
hub / github.com/sindresorhus/execa / testInspectSamePort

Function testInspectSamePort

test/methods/node.js:230–234  ·  view source on GitHub ↗
(t, execaMethod)

Source from the content-addressed store, hash-verified

228test.serial('The "nodeOptions" option allows --inspect with a different port even when defined by current process - "node" option', testInspectDifferentPort, 'nodeOption');
229
230const testInspectSamePort = async (t, execaMethod) => {
231 const {stdout, stdio} = await spawnNestedExecaNode(['--inspect=9226'], '', execaMethod, '--inspect=9226');
232 t.is(stdout, foobarString);
233 t.true(stdio[3].includes('address already in use'));
234};
235
236test.serial('The "nodeOptions" option forbids --inspect with the same port when defined by current process - execaNode()', testInspectSamePort, 'execaNode');
237test.serial('The "nodeOptions" option forbids --inspect with the same port when defined by current process - "node" option', testInspectSamePort, 'nodeOption');

Callers

nothing calls this directly

Calls 1

spawnNestedExecaNodeFunction · 0.85

Tested by

no test coverage detected