Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/test/utils/integration.ts
Asher ad4a70c684
Use warn log level for integration tests
Just to limit all the noise from code-server's startup output.
2021-05-06 14:27:16 -05:00

16 lines
581 B
TypeScript

import { parse, parseConfigFile, setDefaults } from "../../src/node/cli"
import { runCodeServer } from "../../src/node/main"
import * as httpserver from "./httpserver"
export async function setup(argv: string[], configFile?: string): Promise<httpserver.HttpServer> {
argv = ["--bind-addr=localhost:0", "--log=warn", ...argv]
const cliArgs = parse(argv)
const configArgs = parseConfigFile(configFile || "", "test/integration.ts")
const args = await setDefaults(cliArgs, configArgs)
const server = await runCodeServer(args)
return new httpserver.HttpServer(server)
}