diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-03-06 20:48:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 20:48:46 -0500 |
commit | c42a9d737081fb8ee768c7178dae0e1f19c0f343 (patch) | |
tree | 9ffb7e502da62793ea099c34bd7b29c8a7a19b19 /js/resources_test.ts | |
parent | de1a10e5f7afe793a66b2349642ea135fc066104 (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/resources_test.ts')
-rw-r--r-- | js/resources_test.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/resources_test.ts b/js/resources_test.ts index 65002e164..eeb3b3449 100644 --- a/js/resources_test.ts +++ b/js/resources_test.ts @@ -1,12 +1,12 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { test, testPerm, assertEqual } from "./test_util.ts"; +import { test, testPerm, assertEquals } from "./test_util.ts"; test(function resourcesStdio() { const res = Deno.resources(); - assertEqual(res[0], "stdin"); - assertEqual(res[1], "stdout"); - assertEqual(res[2], "stderr"); + assertEquals(res[0], "stdin"); + assertEquals(res[1], "stdout"); + assertEquals(res[2], "stderr"); }); testPerm({ net: true }, async function resourcesNet() { @@ -17,8 +17,8 @@ testPerm({ net: true }, async function resourcesNet() { const listenerConn = await listener.accept(); const res = Deno.resources(); - assertEqual(Object.values(res).filter(r => r === "tcpListener").length, 1); - assertEqual(Object.values(res).filter(r => r === "tcpStream").length, 2); + assertEquals(Object.values(res).filter(r => r === "tcpListener").length, 1); + assertEquals(Object.values(res).filter(r => r === "tcpStream").length, 2); listenerConn.close(); dialerConn.close(); @@ -31,12 +31,12 @@ testPerm({ read: true }, async function resourcesFile() { const resourcesAfter = Deno.resources(); // check that exactly one new resource (file) was added - assertEqual( + assertEquals( Object.keys(resourcesAfter).length, Object.keys(resourcesBefore).length + 1 ); const newRid = Object.keys(resourcesAfter).find(rid => { return !resourcesBefore.hasOwnProperty(rid); }); - assertEqual(resourcesAfter[newRid], "fsFile"); + assertEquals(resourcesAfter[newRid], "fsFile"); }); |