diff options
Diffstat (limited to 'std/fs/copy_test.ts')
-rw-r--r-- | std/fs/copy_test.ts | 35 |
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( |