From d9886a44d107de48b312ba71833709494b5ade5e Mon Sep 17 00:00:00 2001 From: Yusuke Sakurai Date: Mon, 24 Feb 2020 01:59:36 +0900 Subject: fix: [ws] sock shouldn't throw eof error when failed to read frame (#4083) --- std/io/bufio_test.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'std/io/bufio_test.ts') diff --git a/std/io/bufio_test.ts b/std/io/bufio_test.ts index 4f4bd48b1..75bd7b40e 100644 --- a/std/io/bufio_test.ts +++ b/std/io/bufio_test.ts @@ -8,8 +8,8 @@ type Reader = Deno.Reader; import { assert, assertEquals, - assertNotEquals, - fail + fail, + assertNotEOF } from "../testing/asserts.ts"; import { BufReader, @@ -24,11 +24,6 @@ import { charCode, copyBytes, stringsReader } from "./util.ts"; const encoder = new TextEncoder(); -function assertNotEOF(val: T | Deno.EOF): T { - assertNotEquals(val, Deno.EOF); - return val as T; -} - async function readBytes(buf: BufReader): Promise { const b = new Uint8Array(1000); let nb = 0; -- cgit v1.2.3