(...args: Array<string>)
| 152 | const binPath = path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), "../bin.js") |
| 153 | |
| 154 | const run = (...args: Array<string>) => |
| 155 | execFileSync("node", [binPath, ...args], { |
| 156 | encoding: "utf-8", |
| 157 | timeout: 10_000, |
| 158 | env: { ...process.env, NO_COLOR: "1" } |
| 159 | }) |
| 160 | |
| 161 | it("packagejson spawns 'echo hello' and captures output", () => { |
| 162 | const out = run("packagejson", "echo", "hello") |
no outgoing calls
no test coverage detected