fix(ssr): invalid HTML comment tags (#1260)

This commit is contained in:
Marvin Hagemeister
2023-06-09 11:21:36 +02:00
committed by GitHub
parent 347e353357
commit 5724b73e71
23 changed files with 179 additions and 18 deletions
+24
View File
@@ -1,5 +1,6 @@
import {
assert,
assertEquals,
assertStringIncludes,
delay,
Page,
@@ -245,3 +246,26 @@ Deno.test({
sanitizeOps: false,
sanitizeResources: false,
});
Deno.test({
name: "works with older preact-render-to-string v5",
async fn(_t) {
await withPageName(
"./tests/fixture_preact_rts_v5/main.ts",
async (page) => {
await page.goto("http://localhost:8000/", {
waitUntil: "networkidle2",
});
await page.waitForSelector("#foo");
await delay(100);
const text = await page.$eval("#foo", (el) => el.textContent);
assertEquals(text, "it works");
},
);
},
sanitizeOps: false,
sanitizeResources: false,
});