fix: only render keyed comments when needed (#1859)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { assertEquals, assertMatch } from "$std/testing/asserts.ts";
|
||||
import { Page } from "./deps.ts";
|
||||
import {
|
||||
assertNoComments,
|
||||
assertNoPageComments,
|
||||
assertNotSelector,
|
||||
assertSelector,
|
||||
@@ -534,6 +535,13 @@ Deno.test("reconciles keyed non island components", async () => {
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("don't serialize keys for nodes outside islands or partials", async () => {
|
||||
await withFakeServe("./tests/fixture_partials/main.ts", async (server) => {
|
||||
const doc = await server.getHtml("/keys_outside");
|
||||
assertNoComments(doc);
|
||||
});
|
||||
});
|
||||
|
||||
Deno.test("partial injection mode", async () => {
|
||||
await withPageName(
|
||||
"./tests/fixture_partials/main.ts",
|
||||
|
||||
Reference in New Issue
Block a user