diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-29 22:38:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 22:38:10 +0200 |
commit | d308e8d0c0469419517e05a36ba070633168dc67 (patch) | |
tree | 1b9b76c8a443cb781f6c557e964ebae73d64c4bc /std/http/server_test.ts | |
parent | b51c863550cb377f6e720bccf4f1485ed8d97222 (diff) |
BREAKING: remove custom implementation of Deno.Buffer.toString() (#4992)
Keep in mind Buffer.toString() still exists, but returns [object Object].
Reason for removal of Buffer.toString() was that it implicitly used
TextDecoder with fixed "utf-8" encoding and no way to customize
the encoding.
Diffstat (limited to 'std/http/server_test.ts')
-rw-r--r-- | std/http/server_test.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/http/server_test.ts b/std/http/server_test.ts index 4e7b4b69e..03256dd25 100644 --- a/std/http/server_test.ts +++ b/std/http/server_test.ts @@ -63,7 +63,7 @@ test("responseWrite", async function (): Promise<void> { request.conn = mockConn(); await request.respond(testCase.response); - assertEquals(buf.toString(), testCase.raw); + assertEquals(new TextDecoder().decode(buf.bytes()), testCase.raw); await request.done; } }); |