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

Function testNodePath

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

Source from the content-addressed store, hash-verified

86const TEST_NODE_VERSION = '16.0.0';
87
88const testNodePath = async (t, execaMethod, mapPath) => {
89 const nodePath = mapPath(await getNodePath());
90 const {stdout} = await execaMethod('--version', [], {nodePath});
91 t.is(stdout, `v${TEST_NODE_VERSION}`);
92};
93
94test.serial('The "nodePath" option can be used - execaNode()', testNodePath, execaNode, identity);
95test.serial('The "nodePath" option can be a file URL - execaNode()', testNodePath, execaNode, pathToFileURL);

Callers

nothing calls this directly

Calls 1

getNodePathFunction · 0.85

Tested by

no test coverage detected