summaryrefslogtreecommitdiff
path: root/js/os_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/os_test.ts')
-rw-r--r--js/os_test.ts37
1 files changed, 0 insertions, 37 deletions
diff --git a/js/os_test.ts b/js/os_test.ts
index c0198095c..61227a3b1 100644
--- a/js/os_test.ts
+++ b/js/os_test.ts
@@ -60,40 +60,3 @@ test(function makeTempDirSyncPerm() {
assertEqual(err.kind, deno.ErrorKind.PermissionDenied);
assertEqual(err.name, "PermissionDenied");
});
-
-testPerm({ write: true }, function renameSync() {
- const testDir = deno.makeTempDirSync() + "/test-rename";
- const oldpath = testDir + "/oldpath";
- const newpath = testDir + "/newpath";
- deno.mkdirSync(oldpath);
- deno.renameSync(oldpath, newpath);
- const newPathInfo = deno.statSync(newpath);
- assert(newPathInfo.isDirectory());
-
- let caughtErr = false;
- let oldPathInfo;
-
- try {
- oldPathInfo = deno.statSync(oldpath);
- } catch (err) {
- caughtErr = true;
- assertEqual(err.kind, deno.ErrorKind.NotFound);
- assertEqual(err.name, "NotFound");
- }
-
- assert(caughtErr);
- assertEqual(oldPathInfo, undefined);
-});
-
-test(function renameSyncPerm() {
- let err;
- try {
- const oldpath = "/oldbaddir";
- const newpath = "/newbaddir";
- deno.renameSync(oldpath, newpath);
- } catch (err_) {
- err = err_;
- }
- assertEqual(err.kind, deno.ErrorKind.PermissionDenied);
- assertEqual(err.name, "PermissionDenied");
-});