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/read_link_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/read_link_test.ts')
-rw-r--r-- | js/read_link_test.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/js/read_link_test.ts b/js/read_link_test.ts index cbef6334e..270ae54fa 100644 --- a/js/read_link_test.ts +++ b/js/read_link_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { testPerm, assert, assertEqual } from "./test_util.ts"; +import { testPerm, assert, assertEquals } from "./test_util.ts"; testPerm({ write: true, read: true }, function readlinkSyncSuccess() { const testDir = Deno.makeTempDirSync(); @@ -11,7 +11,7 @@ testPerm({ write: true, read: true }, function readlinkSyncSuccess() { if (Deno.build.os !== "win") { Deno.symlinkSync(target, symlink); const targetPath = Deno.readlinkSync(symlink); - assertEqual(targetPath, target); + assertEquals(targetPath, target); } }); @@ -21,8 +21,8 @@ testPerm({ read: false }, async function readlinkSyncPerm() { Deno.readlinkSync("/symlink"); } catch (e) { caughtError = true; - assertEqual(e.kind, Deno.ErrorKind.PermissionDenied); - assertEqual(e.name, "PermissionDenied"); + assertEquals(e.kind, Deno.ErrorKind.PermissionDenied); + assertEquals(e.name, "PermissionDenied"); } assert(caughtError); }); @@ -34,10 +34,10 @@ testPerm({ read: true }, function readlinkSyncNotFound() { data = Deno.readlinkSync("bad_filename"); } catch (e) { caughtError = true; - assertEqual(e.kind, Deno.ErrorKind.NotFound); + assertEquals(e.kind, Deno.ErrorKind.NotFound); } assert(caughtError); - assertEqual(data, undefined); + assertEquals(data, undefined); }); testPerm({ write: true, read: true }, async function readlinkSuccess() { @@ -50,7 +50,7 @@ testPerm({ write: true, read: true }, async function readlinkSuccess() { if (Deno.build.os !== "win") { Deno.symlinkSync(target, symlink); const targetPath = await Deno.readlink(symlink); - assertEqual(targetPath, target); + assertEquals(targetPath, target); } }); @@ -60,8 +60,8 @@ testPerm({ read: false }, async function readlinkPerm() { await Deno.readlink("/symlink"); } catch (e) { caughtError = true; - assertEqual(e.kind, Deno.ErrorKind.PermissionDenied); - assertEqual(e.name, "PermissionDenied"); + assertEquals(e.kind, Deno.ErrorKind.PermissionDenied); + assertEquals(e.name, "PermissionDenied"); } assert(caughtError); }); |