diff options
| author | Yusuke Sakurai <kerokerokerop@gmail.com> | 2019-02-16 01:03:57 +0900 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-15 11:03:57 -0500 |
| commit | 57f4e6a86448263c9f1c75934e829e048c76f572 (patch) | |
| tree | b4e46dcb4a43fec2694e289702fba2cd5e475c50 /io | |
| parent | 34ece9f2ede9c63af2678feb15ef5290a74c8d2f (diff) | |
Redesign of http server module (denoland/deno_std#188)
Original: https://github.com/denoland/deno_std/commit/8569f15207bdc12c2c8ca81e9d020955be54918b
Diffstat (limited to 'io')
| -rw-r--r-- | io/readers_test.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/io/readers_test.ts b/io/readers_test.ts index 0bc8ca36a..add59877d 100644 --- a/io/readers_test.ts +++ b/io/readers_test.ts @@ -7,9 +7,11 @@ import { decode } from "../strings/strings.ts"; test(async function ioStringReader() { const r = new StringReader("abcdef"); - const { nread, eof } = await r.read(new Uint8Array(6)); + const buf = new Uint8Array(6); + const { nread, eof } = await r.read(buf); assert.equal(nread, 6); assert.equal(eof, true); + assert.equal(decode(buf), "abcdef"); }); test(async function ioStringReader() { |
