From fdaf957058075257dd996a541dc333d51ec237e1 Mon Sep 17 00:00:00 2001 From: hasundue Date: Tue, 5 Mar 2024 14:09:21 +0900 Subject: [PATCH] test(registries): omit validity check of url Because it's slow and seems to make Deno panic. For example: https://github.com/hasundue/molt/actions/runs/8151298737/job/22278963037?pr=136 --- test/integration/registries.ts | 8 ------ test/snapshots/registries.ts.snap | 44 ++++++------------------------- 2 files changed, 8 insertions(+), 44 deletions(-) diff --git a/test/integration/registries.ts b/test/integration/registries.ts index c1ad166e..6478cf94 100644 --- a/test/integration/registries.ts +++ b/test/integration/registries.ts @@ -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); diff --git a/test/snapshots/registries.ts.snap b/test/snapshots/registries.ts.snap index a766635c..bd63db51 100644 --- a/test/snapshots/registries.ts.snap +++ b/test/snapshots/registries.ts.snap @@ -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`;