summaryrefslogtreecommitdiff
path: root/cli/tests/unit/copy_file_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/copy_file_test.ts')
-rw-r--r--cli/tests/unit/copy_file_test.ts31
1 files changed, 13 insertions, 18 deletions
diff --git a/cli/tests/unit/copy_file_test.ts b/cli/tests/unit/copy_file_test.ts
index f232efba8..8751291a8 100644
--- a/cli/tests/unit/copy_file_test.ts
+++ b/cli/tests/unit/copy_file_test.ts
@@ -1,10 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-import {
- assertEquals,
- assertRejects,
- assertThrows,
- unitTest,
-} from "./test_util.ts";
+import { assertEquals, assertRejects, assertThrows } from "./test_util.ts";
function readFileString(filename: string | URL): string {
const dataRead = Deno.readFileSync(filename);
@@ -27,7 +22,7 @@ function assertSameContent(
assertEquals(data1, data2);
}
-unitTest(
+Deno.test(
{ permissions: { read: true, write: true } },
function copyFileSyncSuccess() {
const tempDir = Deno.makeTempDirSync();
@@ -44,7 +39,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: true, write: true } },
function copyFileSyncByUrl() {
const tempDir = Deno.makeTempDirSync();
@@ -65,7 +60,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { write: true, read: true } },
function copyFileSyncFailure() {
const tempDir = Deno.makeTempDirSync();
@@ -84,7 +79,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { write: true, read: false } },
function copyFileSyncPerm1() {
assertThrows(() => {
@@ -93,7 +88,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { write: false, read: true } },
function copyFileSyncPerm2() {
assertThrows(() => {
@@ -102,7 +97,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: true, write: true } },
function copyFileSyncOverwrite() {
const tempDir = Deno.makeTempDirSync();
@@ -121,7 +116,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: true, write: true } },
async function copyFileSuccess() {
const tempDir = Deno.makeTempDirSync();
@@ -138,7 +133,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: true, write: true } },
async function copyFileByUrl() {
const tempDir = Deno.makeTempDirSync();
@@ -159,7 +154,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: true, write: true } },
async function copyFileFailure() {
const tempDir = Deno.makeTempDirSync();
@@ -178,7 +173,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: true, write: true } },
async function copyFileOverwrite() {
const tempDir = Deno.makeTempDirSync();
@@ -197,7 +192,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: false, write: true } },
async function copyFilePerm1() {
await assertRejects(async () => {
@@ -206,7 +201,7 @@ unitTest(
},
);
-unitTest(
+Deno.test(
{ permissions: { read: true, write: false } },
async function copyFilePerm2() {
await assertRejects(async () => {