summaryrefslogtreecommitdiff
path: root/std/ws/test.ts
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2021-01-14 20:32:27 -0800
committerBert Belder <bertbelder@gmail.com>2021-01-29 01:35:07 -0800
commit98878bd81231a631c494b6767576097f945eb813 (patch)
treef66f027cf9692548696a7ce5417fba60cec51f60 /std/ws/test.ts
parentc8a5e3c1e485915880bd5ed10438ac87baf4a80b (diff)
refactor: IO resource types, fix concurrent read/write and graceful close (#9118)
Fixes: 9032.
Diffstat (limited to 'std/ws/test.ts')
-rw-r--r--std/ws/test.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/ws/test.ts b/std/ws/test.ts
index 45e34d579..c437d8c28 100644
--- a/std/ws/test.ts
+++ b/std/ws/test.ts
@@ -102,7 +102,7 @@ Deno.test("[ws] read unmasked ping / pong frame", async () => {
);
assertEquals(actual1, "Hello");
// deno-fmt-ignore
- const pongFrame= [0x8a, 0x85, 0x37, 0xfa, 0x21, 0x3d, 0x7f, 0x9f, 0x4d, 0x51, 0x58]
+ const pongFrame = [0x8a, 0x85, 0x37, 0xfa, 0x21, 0x3d, 0x7f, 0x9f, 0x4d, 0x51, 0x58]
const buf2 = new BufReader(new Deno.Buffer(new Uint8Array(pongFrame)));
const pong = await readFrame(buf2);
assertEquals(pong.opcode, OpCode.Pong);
@@ -283,7 +283,7 @@ Deno.test("[ws] ws.close() should use 1000 as close code", async () => {
function dummyConn(r: Deno.Reader, w: Deno.Writer): Deno.Conn {
return {
rid: -1,
- closeWrite: (): void => {},
+ closeWrite: (): Promise<void> => Promise.resolve(),
read: (x: Uint8Array): Promise<number | null> => r.read(x),
write: (x: Uint8Array): Promise<number> => w.write(x),
close: (): void => {},