deno.land / x / esm@v135_2 / test / fix-url / fix-url.test.ts

fix-url.test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { assertEquals } from "https://deno.land/std@0.180.0/testing/asserts.ts";
const { version } = await fetch("http://localhost:8080/status.json").then( (r) => r.json(),);
Deno.test("Fix wasm URL", async () => { const res = await fetch( `http://localhost:8080/v${version}/lightningcss-wasm@1.19.0/deno/lightningcss_node.wasm`, { redirect: "manual" }, ); res.body?.cancel(); assertEquals(res.status, 301); assertEquals( res.headers.get("location"), "http://localhost:8080/lightningcss-wasm@1.19.0/lightningcss_node.wasm", );});
Deno.test("Fix json URL", async () => { const res = await fetch( `http://localhost:8080/v${version}/lightningcss-wasm@1.19.0/deno/package.json`, { redirect: "manual" }, ); res.body?.cancel(); assertEquals(res.status, 301); assertEquals( res.headers.get("location"), "http://localhost:8080/lightningcss-wasm@1.19.0/package.json", );});
esm

Version Info

Tagged at
a year ago