Skip to content

Commit

Permalink
chore: exclude test from windows
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Feb 29, 2024
1 parent aa2a647 commit 6e643e6
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions test/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,26 +298,29 @@ describe("publish", () => {
});
}).timeout(600000);

it("use deno binary from DENO_BIN_PATH when set", async () => {
await runInTempDir(async (dir) => {
await fs.promises.writeFile(
path.join(dir, "mod.ts"),
"export const value = 42;",
"utf-8",
);
// Windows doesn't support #!/usr/bin/env
if (process.platform !== "win32") {
it("use deno binary from DENO_BIN_PATH when set", async () => {
await runInTempDir(async (dir) => {
await fs.promises.writeFile(
path.join(dir, "mod.ts"),
"export const value = 42;",
"utf-8",
);

// TODO: Change this once deno supports jsr.json
await writeJson<DenoJson>(path.join(dir, "deno.json"), {
name: "@deno/jsr-cli-test",
version: "1.0.0",
exports: {
".": "./mod.ts",
},
});
// TODO: Change this once deno supports jsr.json
await writeJson<DenoJson>(path.join(dir, "deno.json"), {
name: "@deno/jsr-cli-test",
version: "1.0.0",
exports: {
".": "./mod.ts",
},
});

await runJsr(["publish", "--dry-run", "--non-existant-option"], dir, {
DENO_BIN_PATH: path.join(__dirname, "fixtures", "dummy.js"),
await runJsr(["publish", "--dry-run", "--non-existant-option"], dir, {
DENO_BIN_PATH: path.join(__dirname, "fixtures", "dummy.js"),
});
});
});
});
}
});

0 comments on commit 6e643e6

Please sign in to comment.