Skip to content

Commit

Permalink
fix(cli): prevent --unstable-lock from throwing for local imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hasundue committed Jun 13, 2024
1 parent f728f74 commit ac0f030
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions cli/main_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "@std/assert/assert-equals";
import { assertEquals, assertStringIncludes } from "@std/assert";
import { stripAnsiCode } from "@std/fmt/colors";
import { describe, it } from "@std/testing/bdd";
import dedent from "dedent";
Expand Down Expand Up @@ -246,11 +246,12 @@ describe("CLI", () => {
);
});

// FIXME: The list of files only includes `deno.jsonc`
it.ignore("should find updates to a lock file with `--unstable-lock` option", async () => {
const { stdout, stderr } = await molt(
// FIXME: Abandon the stub for `fetch` to test this feature.
it("should find updates to a lock file with `--unstable-lock` option", async () => {
const { code, stdout, stderr } = await molt(
"mod_test.ts --unstable-lock --import-map deno.jsonc --write",
);
assertEquals(code, 1);
assertEquals(
stdout,
dedent`
Expand All @@ -265,11 +266,14 @@ describe("CLI", () => {
deno.lock
💾 deno.jsonc
💾 deno.lock
💾 mod_test.ts
💾 mod.ts
`,
);
assertStringIncludes(
stderr,
dedent`
Error: Download https://deno.land/x/deno_graph@123.456.789/mod.ts
error: Module not found "https://deno.land/x/deno_graph@123.456.789/mod.ts".
`,
);
});
});

0 comments on commit ac0f030

Please sign in to comment.