summaryrefslogtreecommitdiff
path: root/std/fs/ensure_link_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-11 17:24:27 +0100
committerGitHub <noreply@github.com>2020-02-11 17:24:27 +0100
commit61273085e40fb4d992eef4b1b5601e3567c80664 (patch)
tree1ac0f401d4cb897bdb6f88e3a5c47fece2856f89 /std/fs/ensure_link_test.ts
parente0bcecee6042b219c6626172851af5a25362b948 (diff)
refactor: rewrite tests in std/ to use Deno.test (#3930)
Diffstat (limited to 'std/fs/ensure_link_test.ts')
-rw-r--r--std/fs/ensure_link_test.ts13
1 files changed, 6 insertions, 7 deletions
diff --git a/std/fs/ensure_link_test.ts b/std/fs/ensure_link_test.ts
index daf216c49..6e9804152 100644
--- a/std/fs/ensure_link_test.ts
+++ b/std/fs/ensure_link_test.ts
@@ -1,6 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// TODO(axetroy): Add test for Windows once symlink is implemented for Windows.
-import { test } from "../testing/mod.ts";
import {
assertEquals,
assertThrows,
@@ -11,7 +10,7 @@ import { ensureLink, ensureLinkSync } from "./ensure_link.ts";
const testdataDir = path.resolve("fs", "testdata");
-test(async function ensureLinkIfItNotExist(): Promise<void> {
+Deno.test(async function ensureLinkIfItNotExist(): Promise<void> {
const srcDir = path.join(testdataDir, "ensure_link_1");
const destDir = path.join(testdataDir, "ensure_link_1_2");
const testFile = path.join(srcDir, "test.txt");
@@ -26,7 +25,7 @@ test(async function ensureLinkIfItNotExist(): Promise<void> {
await Deno.remove(destDir, { recursive: true });
});
-test(function ensureLinkSyncIfItNotExist(): void {
+Deno.test(function ensureLinkSyncIfItNotExist(): void {
const testDir = path.join(testdataDir, "ensure_link_2");
const testFile = path.join(testDir, "test.txt");
const linkFile = path.join(testDir, "link.txt");
@@ -38,7 +37,7 @@ test(function ensureLinkSyncIfItNotExist(): void {
Deno.removeSync(testDir, { recursive: true });
});
-test(async function ensureLinkIfItExist(): Promise<void> {
+Deno.test(async function ensureLinkIfItExist(): Promise<void> {
const testDir = path.join(testdataDir, "ensure_link_3");
const testFile = path.join(testDir, "test.txt");
const linkFile = path.join(testDir, "link.txt");
@@ -85,7 +84,7 @@ test(async function ensureLinkIfItExist(): Promise<void> {
await Deno.remove(testDir, { recursive: true });
});
-test(function ensureLinkSyncIfItExist(): void {
+Deno.test(function ensureLinkSyncIfItExist(): void {
const testDir = path.join(testdataDir, "ensure_link_4");
const testFile = path.join(testDir, "test.txt");
const linkFile = path.join(testDir, "link.txt");
@@ -133,7 +132,7 @@ test(function ensureLinkSyncIfItExist(): void {
Deno.removeSync(testDir, { recursive: true });
});
-test(async function ensureLinkDirectoryIfItExist(): Promise<void> {
+Deno.test(async function ensureLinkDirectoryIfItExist(): Promise<void> {
const testDir = path.join(testdataDir, "ensure_link_origin_3");
const linkDir = path.join(testdataDir, "ensure_link_link_3");
const testFile = path.join(testDir, "test.txt");
@@ -153,7 +152,7 @@ test(async function ensureLinkDirectoryIfItExist(): Promise<void> {
Deno.removeSync(testDir, { recursive: true });
});
-test(function ensureLinkSyncDirectoryIfItExist(): void {
+Deno.test(function ensureLinkSyncDirectoryIfItExist(): void {
const testDir = path.join(testdataDir, "ensure_link_origin_3");
const linkDir = path.join(testdataDir, "ensure_link_link_3");
const testFile = path.join(testDir, "test.txt");