Archived
1
0

Refactor integration tests to use main entry point

This commit is contained in:
Asher
2021-05-05 12:20:38 -05:00
parent 20e70cfa05
commit a882be5748
5 changed files with 17 additions and 20 deletions

View File

@ -24,7 +24,8 @@ async function entry(): Promise<void> {
if (isChild(wrapper)) {
const args = await wrapper.handshake()
wrapper.preventExit()
return runCodeServer(args)
await runCodeServer(args)
return
}
const cliArgs = parse(process.argv.slice(2))

View File

@ -82,7 +82,7 @@ export const openInExistingInstance = async (args: DefaultedArgs, socketPath: st
vscode.end()
}
export const runCodeServer = async (args: DefaultedArgs): Promise<void> => {
export const runCodeServer = async (args: DefaultedArgs): Promise<http.Server> => {
logger.info(`code-server ${version} ${commit}`)
logger.info(`Using user-data-dir ${humanPath(args["user-data-dir"])}`)
@ -154,4 +154,6 @@ export const runCodeServer = async (args: DefaultedArgs): Promise<void> => {
logger.error("Failed to open", field("address", openAddress), field("error", error))
}
}
return server
}