mirror of https://git.tuxpa.in/a/code-server.git
Remove extra awaits from tests
This commit is contained in:
parent
d27126530f
commit
f33402c503
|
@ -360,7 +360,7 @@ describe("cli", () => {
|
|||
|
||||
it("should use existing if --reuse-window is set", async () => {
|
||||
args["reuse-window"] = true
|
||||
await expect(await shouldOpenInExistingInstance(args)).toStrictEqual(undefined)
|
||||
await expect(shouldOpenInExistingInstance(args)).resolves.toStrictEqual(undefined)
|
||||
|
||||
await fs.writeFile(vscodeIpcPath, "test")
|
||||
await expect(shouldOpenInExistingInstance(args)).resolves.toStrictEqual("test")
|
||||
|
|
|
@ -110,10 +110,10 @@ describe("SocketProxyProvider", () => {
|
|||
provider.stop() // We don't need more proxies.
|
||||
|
||||
proxy.write("server proxy->client")
|
||||
const dataFromServerToClient = await (await getData(fromServerToClient)).toString()
|
||||
const dataFromServerToClient = (await getData(fromServerToClient)).toString()
|
||||
expect(dataFromServerToClient).toBe("server proxy->client")
|
||||
client.write("client->server proxy")
|
||||
const dataFromClientToProxy = await (await getData(fromClientToProxy)).toString()
|
||||
const dataFromClientToProxy = (await getData(fromClientToProxy)).toString()
|
||||
expect(dataFromClientToProxy).toBe("client->server proxy")
|
||||
expect(errors).toEqual(0)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue