Refactor integration tests to use main entry point
This commit is contained in:
@ -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))
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user