diff options
author | Yusuke Sakurai <kerokerokerop@gmail.com> | 2020-02-24 01:59:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-23 11:59:36 -0500 |
commit | d9886a44d107de48b312ba71833709494b5ade5e (patch) | |
tree | ef61ff2a5f8fd9e9054bac28b76639abd129c44d /std/io/bufio_test.ts | |
parent | e9fff02e9681f3eb2edee9f94db66b140e179899 (diff) |
fix: [ws] sock shouldn't throw eof error when failed to read frame (#4083)
Diffstat (limited to 'std/io/bufio_test.ts')
-rw-r--r-- | std/io/bufio_test.ts | 9 |
1 files changed, 2 insertions, 7 deletions
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<T extends {}>(val: T | Deno.EOF): T { - assertNotEquals(val, Deno.EOF); - return val as T; -} - async function readBytes(buf: BufReader): Promise<string> { const b = new Uint8Array(1000); let nb = 0; |