(command: string, args: ReadonlyArray<string>, cwd: string)
| 11 | // Runs a command without blocking the Vitest worker, so concurrent sibling |
| 12 | // tests are not held up (and timed out) while it runs. |
| 13 | const run = (command: string, args: ReadonlyArray<string>, cwd: string) => |
| 14 | new Promise<{ readonly status: number | null; readonly stdout: string; readonly stderr: string }>( |
| 15 | (resolve, reject) => { |
| 16 | const child = spawn(command, args, { cwd }) |
| 17 | let stdout = "" |
| 18 | let stderr = "" |
| 19 | child.stdout.setEncoding("utf8").on("data", (data) => stdout += data) |
| 20 | child.stderr.setEncoding("utf8").on("data", (data) => stderr += data) |
| 21 | child.on("error", reject) |
| 22 | child.on("close", (status) => resolve({ status, stdout, stderr })) |
| 23 | } |
| 24 | ) |
| 25 | |
| 26 | describe("Data", () => { |
| 27 | describe("Class", () => { |
no test coverage detected