fix: refresh not working (#1659)
This commit is contained in:
@@ -90,6 +90,9 @@ export function renderOuterDocument(
|
||||
opts.preloads.map((src) =>
|
||||
h("link", { rel: "modulepreload", href: src })
|
||||
),
|
||||
opts.moduleScripts.map(([src, nonce]) =>
|
||||
h("script", { src: src, nonce, type: "module" })
|
||||
),
|
||||
headVNodes,
|
||||
h("body", {
|
||||
...docBody,
|
||||
|
||||
@@ -971,3 +971,10 @@ Deno.test({
|
||||
sanitizeOps: false,
|
||||
sanitizeResources: false,
|
||||
});
|
||||
|
||||
Deno.test("adds refresh script to html", async () => {
|
||||
await withFresh("./tests/fixture/main.ts", async (address) => {
|
||||
const doc = await fetchHtml(address);
|
||||
assertSelector(doc, `script[src="/_frsh/refresh.js"]`);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user