Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test: skip test in windwos.
  • Loading branch information
axetroy committed Mar 14, 2019
1 parent 934150f commit 785a982
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions fs/ensure_symlink_test.ts
Expand Up @@ -10,7 +10,15 @@ import * as path from "./path/mod.ts";

const testdataDir = path.resolve("fs", "testdata");

// TODO(axetroy): Deno@0.3.3 not support symlink in windows
// In order to pass the CI test, we ignore it in windows.
// Should be removed when support
const shouldSkip = Deno.platform.os === "win";

test(async function ensureSymlinkIfItNotExist() {
if (shouldSkip) {
return;
}
const testDir = path.join(testdataDir, "link_file_1");
const testFile = path.join(testDir, "test.txt");

Expand All @@ -26,6 +34,9 @@ test(async function ensureSymlinkIfItNotExist() {
});

test(function ensureSymlinkSyncIfItNotExist() {
if (shouldSkip) {
return;
}
const testDir = path.join(testdataDir, "link_file_2");
const testFile = path.join(testDir, "test.txt");

Expand All @@ -40,6 +51,9 @@ test(function ensureSymlinkSyncIfItNotExist() {
});

test(async function ensureSymlinkIfItExist() {
if (shouldSkip) {
return;
}
const testDir = path.join(testdataDir, "link_file_3");
const testFile = path.join(testDir, "test.txt");
const linkFile = path.join(testDir, "link.txt");
Expand All @@ -59,6 +73,9 @@ test(async function ensureSymlinkIfItExist() {
});

test(function ensureSymlinkSyncIfItExist() {
if (shouldSkip) {
return;
}
const testDir = path.join(testdataDir, "link_file_4");
const testFile = path.join(testDir, "test.txt");
const linkFile = path.join(testDir, "link.txt");
Expand All @@ -79,6 +96,9 @@ test(function ensureSymlinkSyncIfItExist() {
});

test(async function ensureSymlinkDirectoryIfItExist() {
if (shouldSkip) {
return;
}
const testDir = path.join(testdataDir, "link_file_origin_3");
const linkDir = path.join(testdataDir, "link_file_link_3");
const testFile = path.join(testDir, "test.txt");
Expand All @@ -101,6 +121,9 @@ test(async function ensureSymlinkDirectoryIfItExist() {
});

test(function ensureSymlinkSyncDirectoryIfItExist() {
if (shouldSkip) {
return;
}
const testDir = path.join(testdataDir, "link_file_origin_3");
const linkDir = path.join(testdataDir, "link_file_link_3");
const testFile = path.join(testDir, "test.txt");
Expand Down

0 comments on commit 785a982

Please sign in to comment.