summaryrefslogtreecommitdiff
path: root/testing/README.md
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-03-06 19:42:24 -0500
committerGitHub <noreply@github.com>2019-03-06 19:42:24 -0500
commitcaa383a5835c167bf6657120ad3c1c5009670785 (patch)
tree2f350928e23e472278b9c3ebd798f13169b6d581 /testing/README.md
parente36edfdb3fd4709358a5f499f13cfe3d53c2b4f7 (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 'testing/README.md')
-rw-r--r--testing/README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/testing/README.md b/testing/README.md
index 4c295e472..c134dd912 100644
--- a/testing/README.md
+++ b/testing/README.md
@@ -16,7 +16,7 @@ Asserts are exposed in `testing/asserts.ts` module.
- `equal` - Deep comparision function, where `actual` and `expected` are
compared deeply, and if they vary, `equal` returns `false`.
- `assert()` - Expects a boolean value, throws if the value is `false`.
-- `assertEq()` - Uses the `equal` comparison and throws if the `actual` and
+- `assertEquals()` - Uses the `equal` comparison and throws if the `actual` and
`expected` are not equal.
- `assertStrictEq()` - Compares `actual` and `expected` strictly, therefore
for non-primitives the values must reference the same instance.
@@ -36,13 +36,13 @@ Basic usage:
```ts
import { runTests, test } from "https://deno.land/std/testing/mod.ts";
-import { assertEq } from "https://deno.land/std/testing/asserts.ts";
+import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
test({
name: "testing example",
fn() {
- assertEq("world", "world"));
- assertEq({ hello: "world" }, { hello: "world" }));
+ assertEquals("world", "world"));
+ assertEquals({ hello: "world" }, { hello: "world" }));
}
});
@@ -53,8 +53,8 @@ Short syntax (named function instead of object):
```ts
test(function example() {
- assertEq("world", "world"));
- assertEq({ hello: "world" }, { hello: "world" }));
+ assertEquals("world", "world"));
+ assertEquals({ hello: "world" }, { hello: "world" }));
});
```