Skip to content

Commit

Permalink
Temporarily disable chdir tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervonb committed Mar 20, 2021
1 parent c83adee commit 7601e72
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions cli/tests/unit/dir_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ Deno.test("dirCwdNotNull", function (): void {
assert(Deno.cwd() != null);
});

Deno.test("dirCwdChdirSuccess", function (): void {
const initialdir = Deno.cwd();
const path = Deno.makeTempDirSync();
Deno.chdir(path);
const current = Deno.cwd();
if (Deno.build.os === "darwin") {
assertEquals(current, "/private" + path);
} else {
assertEquals(current, path);
}
Deno.chdir(initialdir);
Deno.test({
name: "dirCwdChdirSuccess",
ignore: true,
fn(): void {
const initialdir = Deno.cwd();
const path = Deno.makeTempDirSync();
Deno.chdir(path);
const current = Deno.cwd();
if (Deno.build.os === "darwin") {
assertEquals(current, "/private" + path);
} else {
assertEquals(current, path);
}
Deno.chdir(initialdir);
},
});

Deno.test("dirCwdError", function (): void {
// excluding windows since it throws resource busy, while removeSync
if (["linux", "darwin"].includes(Deno.build.os)) {
Deno.test({
name: "dirCwdError",
ignore: true,
fn(): void {
const initialdir = Deno.cwd();
const path = Deno.makeTempDirSync();
Deno.chdir(path);
Expand All @@ -32,7 +37,7 @@ Deno.test("dirCwdError", function (): void {
} finally {
Deno.chdir(initialdir);
}
}
},
});

Deno.test("dirChdirError", function (): void {
Expand Down

0 comments on commit 7601e72

Please sign in to comment.