feat: only enable partials when attribute is set (#1861)

This commit is contained in:
Marvin Hagemeister
2023-10-05 10:47:37 +02:00
committed by GitHub
parent add696faeb
commit fd235e877c
3 changed files with 77 additions and 41 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ export default defineApp((res, ctx) => {
<title>test</title>
<link rel="stylesheet" href="/style.css" />
</head>
<body>
<body f-client-nav>
<ctx.Component />
</body>
</html>
+4 -2
View File
@@ -630,7 +630,10 @@ Deno.test("partial navigation", async () => {
document.querySelectorAll(".island").length === 1
);
assertEquals(page.url(), initialUrl);
await waitForText(page, "pre", "mount Counter A\n");
await waitFor(async () => {
const doc = parseHtml(await page.content());
return /mount Counter A/.test(doc.querySelector("pre")!.textContent!);
});
await assertNoPageComments(page);
},
);
@@ -1024,4 +1027,3 @@ Deno.test("throws an error when response contains no partials", async () => {
});
// TODO Head merging
// TODO Children Keys