(t, execaMethod)
| 155 | }); |
| 156 | |
| 157 | const testSubprocessNodePathCwd = async (t, execaMethod) => { |
| 158 | const nodePath = await getNodePath(); |
| 159 | const cwd = path.dirname(path.dirname(nodePath)); |
| 160 | const relativeExecPath = path.relative(cwd, nodePath); |
| 161 | const {stdout} = await execaMethod(...nodePathArguments, {nodePath: relativeExecPath, cwd}); |
| 162 | t.true(stdout.includes(TEST_NODE_VERSION)); |
| 163 | }; |
| 164 | |
| 165 | test.serial('The "nodePath" option is relative to "cwd" when used in the subprocess - execaNode()', testSubprocessNodePathCwd, execaNode); |
| 166 | test.serial('The "nodePath" option is relative to "cwd" when used in the subprocess - "node" option', testSubprocessNodePathCwd, runWithNodeOption); |
nothing calls this directly
no test coverage detected