未验证 提交 f33402c5 编写于 作者: A Asher

Remove extra awaits from tests

上级 d2712653
......@@ -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)
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册