Skip to content

Commit ac0f030

Browse files
committed
fix(cli): prevent --unstable-lock from throwing for local imports
1 parent f728f74 commit ac0f030

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

cli/main_test.ts

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "@std/assert/assert-equals";
1+
import { assertEquals, assertStringIncludes } from "@std/assert";
22
import { stripAnsiCode } from "@std/fmt/colors";
33
import { describe, it } from "@std/testing/bdd";
44
import dedent from "dedent";
@@ -246,11 +246,12 @@ describe("CLI", () => {
246246
);
247247
});
248248

249-
// FIXME: The list of files only includes `deno.jsonc`
250-
it.ignore("should find updates to a lock file with `--unstable-lock` option", async () => {
251-
const { stdout, stderr } = await molt(
249+
// FIXME: Abandon the stub for `fetch` to test this feature.
250+
it("should find updates to a lock file with `--unstable-lock` option", async () => {
251+
const { code, stdout, stderr } = await molt(
252252
"mod_test.ts --unstable-lock --import-map deno.jsonc --write",
253253
);
254+
assertEquals(code, 1);
254255
assertEquals(
255256
stdout,
256257
dedent`
@@ -265,11 +266,14 @@ describe("CLI", () => {
265266
deno.lock
266267
267268
💾 deno.jsonc
268-
💾 deno.lock
269-
💾 mod_test.ts
270-
💾 mod.ts
271269
`,
270+
);
271+
assertStringIncludes(
272272
stderr,
273+
dedent`
274+
Error: Download https://deno.land/x/deno_graph@123.456.789/mod.ts
275+
error: Module not found "https://deno.land/x/deno_graph@123.456.789/mod.ts".
276+
`,
273277
);
274278
});
275279
});

0 commit comments

Comments
 (0)