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

Function testSubprocessNodePath

test/methods/node.js:132–136  ·  view source on GitHub ↗
(t, execaMethod, mapPath)

Source from the content-addressed store, hash-verified

130const nodePathArguments = ['-p', ['process.env.Path || process.env.PATH']];
131
132const testSubprocessNodePath = async (t, execaMethod, mapPath) => {
133 const nodePath = mapPath(await getNodePath());
134 const {stdout} = await execaMethod(...nodePathArguments, {nodePath});
135 t.true(stdout.includes(TEST_NODE_VERSION));
136};
137
138test.serial('The "nodePath" option impacts the subprocess - execaNode()', testSubprocessNodePath, execaNode, identity);
139test.serial('The "nodePath" option impacts the subprocess - "node" option', testSubprocessNodePath, runWithNodeOption, identity);

Callers

nothing calls this directly

Calls 1

getNodePathFunction · 0.85

Tested by

no test coverage detected