Skip to content

Commit

Permalink
test: fix esm-worker testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Jul 26, 2024
1 parent ffc11d6 commit 72fb460
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/esm-worker/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,13 @@ Deno.test("esm-worker", { sanitizeOps: false, sanitizeResources: false }, async
assertEquals(res9.status, 200);
assertStringIncludes(await res9.text(), `from "react"`);

const res10 = await fetch(`${workerOrigin}/[email protected]/es2022/typescript.mjs`);
const res10 = await fetch(`${workerOrigin}/[email protected]/es2022/typescript.mjs`);
const js = await res10.text();
assertEquals(res10.status, 200);
assertStringIncludes(await res10.text(), `"/node/process.js"`);
assertStringIncludes(js, `__Process$`);
assert(!js.includes("/node/process.js"));

const res11 = await fetch(`${workerOrigin}/typescript@5.4.2/es2022/typescript.mjs.map`);
const res11 = await fetch(`${workerOrigin}/typescript@5.5.4/es2022/typescript.mjs.map`);
assertEquals(res11.status, 200);
assertEquals(res11.headers.get("Content-Type"), "application/json; charset=utf-8");
});
Expand Down

0 comments on commit 72fb460

Please sign in to comment.