summaryrefslogtreecommitdiff
path: root/std/fs/copy_test.ts
diff options
context:
space:
mode:
authorAli Hasani <a.hassssani@gmail.com>2020-05-19 03:16:02 +0430
committerGitHub <noreply@github.com>2020-05-19 00:46:02 +0200
commit6072755eadb7342a409f43260e5a17b956703a1c (patch)
tree35ec9b10eddafdc2b0dacecc439aa8d9f785529a /std/fs/copy_test.ts
parent88b24261ba467c20d4ef90224b07c19a71398f0f (diff)
Implement Deno.symlink() for windows (#5533)
Diffstat (limited to 'std/fs/copy_test.ts')
-rw-r--r--std/fs/copy_test.ts35
1 files changed, 0 insertions, 35 deletions
diff --git a/std/fs/copy_test.ts b/std/fs/copy_test.ts
index 1f3330226..cb97d4ba7 100644
--- a/std/fs/copy_test.ts
+++ b/std/fs/copy_test.ts
@@ -14,9 +14,6 @@ import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts";
const testdataDir = path.resolve("fs", "testdata");
-// TODO(axetroy): Add test for Windows once symlink is implemented for Windows.
-const isWindows = Deno.build.os === "windows";
-
function testCopy(name: string, cb: (tempDir: string) => Promise<void>): void {
Deno.test({
name,
@@ -257,14 +254,6 @@ testCopy(
const srcLink = path.join(dir, "0.txt");
const destLink = path.join(tempDir, "0_copy.txt");
- if (isWindows) {
- await assertThrowsAsync(
- // (): Promise<void> => copy(srcLink, destLink),
- (): Promise<void> => ensureSymlink(srcLink, destLink)
- );
- return;
- }
-
assert(
(await Deno.lstat(srcLink)).isSymlink,
`'${srcLink}' should be symlink type`
@@ -285,14 +274,6 @@ testCopy(
const srcLink = path.join(tempDir, "copy_dir_link");
const destLink = path.join(tempDir, "copy_dir_link_copy");
- if (isWindows) {
- await assertThrowsAsync(
- // (): Promise<void> => copy(srcLink, destLink),
- (): Promise<void> => ensureSymlink(srcLink, destLink)
- );
- return;
- }
-
await ensureSymlink(srcDir, srcLink);
assert(
@@ -497,14 +478,6 @@ testCopySync(
const srcLink = path.join(dir, "0.txt");
const destLink = path.join(tempDir, "0_copy.txt");
- if (isWindows) {
- assertThrows(
- // (): void => copySync(srcLink, destLink),
- (): void => ensureSymlinkSync(srcLink, destLink)
- );
- return;
- }
-
assert(
Deno.lstatSync(srcLink).isSymlink,
`'${srcLink}' should be symlink type`
@@ -525,14 +498,6 @@ testCopySync(
const srcLink = path.join(tempDir, "copy_dir_link");
const destLink = path.join(tempDir, "copy_dir_link_copy");
- if (isWindows) {
- assertThrows(
- // (): void => copySync(srcLink, destLink),
- (): void => ensureSymlinkSync(srcLink, destLink)
- );
- return;
- }
-
ensureSymlinkSync(originDir, srcLink);
assert(