summaryrefslogtreecommitdiff
path: root/js/symlink_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/symlink_test.ts')
-rw-r--r--js/symlink_test.ts7
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<