Skip to content

Commit

Permalink
test(registries): omit validity check of url
Browse files Browse the repository at this point in the history
Because it's slow and seems to make Deno panic. For example:
https://github.com/hasundue/molt/actions/runs/8151298737/job/22278963037?pr=136
  • Loading branch information
hasundue committed Mar 5, 2024
1 parent 0aaabb5 commit fdaf957
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 44 deletions.
8 changes: 0 additions & 8 deletions test/integration/registries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ for (const spec of SPECS) {
Deno.test(name, async (t) => {
const assert = (it: unknown) => assertSnapshot(t, it !== undefined);

// Make sure the URL is valid.
// Skip this test for npm because it fails.
if (spec[0] !== "npm:") {
await assert(await import(spec[1]));
} else {
await assert(true);
}

// Check if the dependency can be parsed.
const parsed = parse(spec[1]);
await assert(parsed.version);
Expand Down
44 changes: 8 additions & 36 deletions test/snapshots/registries.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,54 @@ snapshot[`registry - deno.land/std 1`] = `true`;

snapshot[`registry - deno.land/std 2`] = `true`;

snapshot[`registry - deno.land/std 3`] = `true`;

snapshot[`registry - deno.land/x 1`] = `true`;

snapshot[`registry - deno.land/x 2`] = `true`;

snapshot[`registry - deno.land/x 3`] = `true`;

snapshot[`registry - npm: 1`] = `true`;

snapshot[`registry - npm: 2`] = `true`;

snapshot[`registry - npm: 3`] = `true`;

snapshot[`registry - jsr: 1`] = `true`;

snapshot[`registry - jsr: 2`] = `true`;

snapshot[`registry - jsr: 3`] = `true`;

snapshot[`registry - cdn.jsdelivr.net/npm 1`] = `true`;

snapshot[`registry - cdn.jsdelivr.net/npm 2`] = `true`;

snapshot[`registry - cdn.jsdelivr.net/npm 3`] = `false`;
snapshot[`registry - cdn.jsdelivr.net/npm 2`] = `false`;

snapshot[`registry - cdn.jsdelivr.net/gh 1`] = `true`;

snapshot[`registry - cdn.jsdelivr.net/gh 2`] = `true`;

snapshot[`registry - cdn.jsdelivr.net/gh 3`] = `false`;
snapshot[`registry - cdn.jsdelivr.net/gh 2`] = `false`;

snapshot[`registry - cdn.skypack.dev 1`] = `true`;

snapshot[`registry - cdn.skypack.dev 2`] = `true`;

snapshot[`registry - cdn.skypack.dev 3`] = `false`;
snapshot[`registry - cdn.skypack.dev 2`] = `false`;

snapshot[`registry - ga.jspm.io 1`] = `true`;

snapshot[`registry - ga.jspm.io 2`] = `true`;

snapshot[`registry - ga.jspm.io 3`] = `false`;
snapshot[`registry - ga.jspm.io 2`] = `false`;

snapshot[`registry - esm.run 1`] = `true`;

snapshot[`registry - esm.run 2`] = `true`;

snapshot[`registry - esm.run 3`] = `false`;
snapshot[`registry - esm.run 2`] = `false`;

snapshot[`registry - esm.sh 1`] = `true`;

snapshot[`registry - esm.sh 2`] = `true`;

snapshot[`registry - esm.sh 3`] = `true`;

snapshot[`registry - x.nest.land 1`] = `true`;

snapshot[`registry - x.nest.land 2`] = `true`;

snapshot[`registry - x.nest.land 3`] = `false`;
snapshot[`registry - x.nest.land 2`] = `false`;

snapshot[`registry - pax.deno.dev 1`] = `true`;

snapshot[`registry - pax.deno.dev 2`] = `true`;
snapshot[`registry - pax.deno.dev 2`] = `false`;

snapshot[`registry - pax.deno.dev 3`] = `false`;

snapshot[`registry - raw.githubusercontent.com 1`] = `true`;
snapshot[`registry - raw.githubusercontent.com 1`] = `false`;

snapshot[`registry - raw.githubusercontent.com 2`] = `false`;

snapshot[`registry - raw.githubusercontent.com 3`] = `false`;

snapshot[`registry - unpkg.com 1`] = `true`;

snapshot[`registry - unpkg.com 2`] = `true`;

snapshot[`registry - unpkg.com 3`] = `true`;

0 comments on commit fdaf957

Please sign in to comment.