( argv: string[], env?: NodeJS.ProcessEnv, )
| 7 | * A helper function for integration tests to run code-server commands. |
| 8 | */ |
| 9 | export async function runCodeServerCommand( |
| 10 | argv: string[], |
| 11 | env?: NodeJS.ProcessEnv, |
| 12 | ): Promise<{ stdout: string; stderr: string }> { |
| 13 | const CODE_SERVER_COMMAND = process.env.CODE_SERVER_PATH || path.resolve("../../release-standalone/bin/code-server") |
| 14 | const { stdout, stderr } = await promisify(exec)(`${CODE_SERVER_COMMAND} ${argv.join(" ")}`, { |
| 15 | env: { ...process.env, ...env }, |
| 16 | }) |
| 17 | |
| 18 | return { stdout, stderr } |
| 19 | } |
no outgoing calls
no test coverage detected