summaryrefslogtreecommitdiff
path: root/js/test_util.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-03-06 20:48:46 -0500
committerGitHub <noreply@github.com>2019-03-06 20:48:46 -0500
commitc42a9d737081fb8ee768c7178dae0e1f19c0f343 (patch)
tree9ffb7e502da62793ea099c34bd7b29c8a7a19b19 /js/test_util.ts
parentde1a10e5f7afe793a66b2349642ea135fc066104 (diff)
Upgrade deno_std (#1892)
A major API change was that asserts are imported from testing/asserts.ts now rather than testing/mod.ts and assertEqual as renamed to assertEquals to conform to what is most common in JavaScript.
Diffstat (limited to 'js/test_util.ts')
-rw-r--r--js/test_util.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/js/test_util.ts b/js/test_util.ts
index c85284019..7cc80e581 100644
--- a/js/test_util.ts
+++ b/js/test_util.ts
@@ -8,7 +8,14 @@
// See tools/unit_tests.py for more details.
import * as testing from "./deps/https/deno.land/std/testing/mod.ts";
-export { assert, assertEqual } from "./deps/https/deno.land/std/testing/mod.ts";
+import {
+ assert,
+ assertEquals
+} from "./deps/https/deno.land/std/testing/asserts.ts";
+export {
+ assert,
+ assertEquals
+} from "./deps/https/deno.land/std/testing/asserts.ts";
// testing.setFilter must be run before any tests are defined.
testing.setFilter(Deno.args[1]);
@@ -64,7 +71,7 @@ test(function permSerialization() {
for (const run of [true, false]) {
for (const read of [true, false]) {
const perms: DenoPermissions = { write, net, env, run, read };
- testing.assertEqual(perms, permFromString(permToString(perms)));
+ assertEquals(perms, permFromString(permToString(perms)));
}
}
}
@@ -81,5 +88,5 @@ test(function permFromStringThrows() {
} catch (e) {
threw = true;
}
- testing.assert(threw);
+ assert(threw);
});