Archived
1
0

Remove extra awaits from tests

This commit is contained in:
Asher 2021-03-15 15:31:19 -05:00
parent d27126530f
commit f33402c503
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
2 changed files with 3 additions and 3 deletions

View File

@ -360,7 +360,7 @@ describe("cli", () => {
it("should use existing if --reuse-window is set", async () => { it("should use existing if --reuse-window is set", async () => {
args["reuse-window"] = true args["reuse-window"] = true
await expect(await shouldOpenInExistingInstance(args)).toStrictEqual(undefined) await expect(shouldOpenInExistingInstance(args)).resolves.toStrictEqual(undefined)
await fs.writeFile(vscodeIpcPath, "test") await fs.writeFile(vscodeIpcPath, "test")
await expect(shouldOpenInExistingInstance(args)).resolves.toStrictEqual("test") await expect(shouldOpenInExistingInstance(args)).resolves.toStrictEqual("test")

View File

@ -110,10 +110,10 @@ describe("SocketProxyProvider", () => {
provider.stop() // We don't need more proxies. provider.stop() // We don't need more proxies.
proxy.write("server proxy->client") proxy.write("server proxy->client")
const dataFromServerToClient = await (await getData(fromServerToClient)).toString() const dataFromServerToClient = (await getData(fromServerToClient)).toString()
expect(dataFromServerToClient).toBe("server proxy->client") expect(dataFromServerToClient).toBe("server proxy->client")
client.write("client->server proxy") 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(dataFromClientToProxy).toBe("client->server proxy")
expect(errors).toEqual(0) expect(errors).toEqual(0)
}) })