Skip to content

Commit f33402c

Browse files
committed
Remove extra awaits from tests
1 parent d271265 commit f33402c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/unit/cli.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ describe("cli", () => {
360360

361361
it("should use existing if --reuse-window is set", async () => {
362362
args["reuse-window"] = true
363-
await expect(await shouldOpenInExistingInstance(args)).toStrictEqual(undefined)
363+
await expect(shouldOpenInExistingInstance(args)).resolves.toStrictEqual(undefined)
364364

365365
await fs.writeFile(vscodeIpcPath, "test")
366366
await expect(shouldOpenInExistingInstance(args)).resolves.toStrictEqual("test")

test/unit/socket.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ describe("SocketProxyProvider", () => {
110110
provider.stop() // We don't need more proxies.
111111

112112
proxy.write("server proxy->client")
113-
const dataFromServerToClient = await (await getData(fromServerToClient)).toString()
113+
const dataFromServerToClient = (await getData(fromServerToClient)).toString()
114114
expect(dataFromServerToClient).toBe("server proxy->client")
115115
client.write("client->server proxy")
116-
const dataFromClientToProxy = await (await getData(fromClientToProxy)).toString()
116+
const dataFromClientToProxy = (await getData(fromClientToProxy)).toString()
117117
expect(dataFromClientToProxy).toBe("client->server proxy")
118118
expect(errors).toEqual(0)
119119
})

0 commit comments

Comments
 (0)