diff options
author | Yingbo (Max) Wang <maxwyb@gmail.com> | 2019-04-23 06:47:29 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-04-23 09:47:29 -0400 |
commit | da64fba046e4f324bff62d71ae74906fa6e3421f (patch) | |
tree | 1fdecc68f9d6644f8c245cad91eaebd3fb5531e0 /js/symlink_test.ts | |
parent | d9408017541ffe6c86f4904973c22f829ade1ac4 (diff) |
symlink: Ignore type parameter on non-Windows platforms (#2185)
Fixes #2169
Diffstat (limited to 'js/symlink_test.ts')
-rw-r--r-- | js/symlink_test.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/symlink_test.ts b/js/symlink_test.ts index ae9b0c8cc..2ce666949 100644 --- a/js/symlink_test.ts +++ b/js/symlink_test.ts @@ -14,6 +14,7 @@ testPerm({ read: true, write: true }, function symlinkSyncSuccess(): void { errOnWindows = e; } if (errOnWindows) { + assertEquals(Deno.platform.os, "win"); assertEquals(errOnWindows.kind, Deno.ErrorKind.Other); assertEquals(errOnWindows.message, "Not implemented"); } else { @@ -36,6 +37,7 @@ test(function symlinkSyncPerm(): void { }); // Just for now, until we implement symlink for Windows. +// Symlink with type should succeed on other platforms with type ignored testPerm({ write: true }, function symlinkSyncNotImplemented(): void { let err; try { @@ -43,7 +45,10 @@ testPerm({ write: true }, function symlinkSyncNotImplemented(): void { } catch (e) { err = e; } - assertEquals(err.message, "Not implemented"); + if (err) { + assertEquals(Deno.platform.os, "win"); + assertEquals(err.message, "Not implemented"); + } }); testPerm({ read: true, write: true }, async function symlinkSuccess(): Promise< |