diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2019-03-06 19:42:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-06 19:42:24 -0500 |
| commit | caa383a5835c167bf6657120ad3c1c5009670785 (patch) | |
| tree | 2f350928e23e472278b9c3ebd798f13169b6d581 /http/server_test.ts | |
| parent | e36edfdb3fd4709358a5f499f13cfe3d53c2b4f7 (diff) | |
Rename assertEq to assertEquals (denoland/deno_std#242)
After some discussion it was found that assertEquals is more common
in JS (vs assertEqual, assertEq) and sounds better in the negated form:
assertNotEquals vs assertNE.
Original: https://github.com/denoland/deno_std/commit/4cf39d4a1420b8153cd78d03d03ef843607ae506
Diffstat (limited to 'http/server_test.ts')
| -rw-r--r-- | http/server_test.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/http/server_test.ts b/http/server_test.ts index 8bba36127..4f1bc1c40 100644 --- a/http/server_test.ts +++ b/http/server_test.ts @@ -7,7 +7,7 @@ const { Buffer } = Deno; import { test } from "../testing/mod.ts"; -import { assertEq } from "../testing/asserts.ts"; +import { assertEquals } from "../testing/asserts.ts"; import { Response, ServerRequest } from "./server.ts"; import { BufReader, BufWriter } from "../io/bufio.ts"; @@ -47,7 +47,7 @@ test(async function responseWrite() { request.w = bufw; await request.respond(testCase.response); - assertEq(buf.toString(), testCase.raw); + assertEquals(buf.toString(), testCase.raw); } }); @@ -59,7 +59,7 @@ test(async function requestBodyWithContentLength() { const buf = new Buffer(enc.encode("Hello")); req.r = new BufReader(buf); const body = dec.decode(await req.body()); - assertEq(body, "Hello"); + assertEquals(body, "Hello"); } // Larger than internal buf @@ -71,7 +71,7 @@ test(async function requestBodyWithContentLength() { const buf = new Buffer(enc.encode(longText)); req.r = new BufReader(buf); const body = dec.decode(await req.body()); - assertEq(body, longText); + assertEquals(body, longText); } }); @@ -96,7 +96,7 @@ test(async function requestBodyWithTransferEncoding() { const buf = new Buffer(enc.encode(chunksData)); req.r = new BufReader(buf); const body = dec.decode(await req.body()); - assertEq(body, shortText); + assertEquals(body, shortText); } // Larger than internal buf @@ -120,7 +120,7 @@ test(async function requestBodyWithTransferEncoding() { const buf = new Buffer(enc.encode(chunksData)); req.r = new BufReader(buf); const body = dec.decode(await req.body()); - assertEq(body, longText); + assertEquals(body, longText); } }); @@ -136,7 +136,7 @@ test(async function requestBodyStreamWithContentLength() { let offset = 0; for await (const chunk of it) { const s = dec.decode(chunk); - assertEq(shortText.substr(offset, s.length), s); + assertEquals(shortText.substr(offset, s.length), s); offset += s.length; } } @@ -153,7 +153,7 @@ test(async function requestBodyStreamWithContentLength() { let offset = 0; for await (const chunk of it) { const s = dec.decode(chunk); - assertEq(longText.substr(offset, s.length), s); + assertEquals(longText.substr(offset, s.length), s); offset += s.length; } } @@ -183,7 +183,7 @@ test(async function requestBodyStreamWithTransferEncoding() { let offset = 0; for await (const chunk of it) { const s = dec.decode(chunk); - assertEq(shortText.substr(offset, s.length), s); + assertEquals(shortText.substr(offset, s.length), s); offset += s.length; } } @@ -212,7 +212,7 @@ test(async function requestBodyStreamWithTransferEncoding() { let offset = 0; for await (const chunk of it) { const s = dec.decode(chunk); - assertEq(longText.substr(offset, s.length), s); + assertEquals(longText.substr(offset, s.length), s); offset += s.length; } } |
