feat: add support for jsx precompile (#2035)
This commit is contained in:
@@ -55,3 +55,25 @@ Deno.test("render head text nodes", async () => {
|
||||
assertEquals(doc.body.textContent, "hello");
|
||||
});
|
||||
});
|
||||
|
||||
Deno.test("support jsx precompile", async () => {
|
||||
await withFakeServe(
|
||||
"./tests/fixture_jsx_precompile/main.ts",
|
||||
async (server) => {
|
||||
const doc = await server.getHtml("/");
|
||||
assertTextMany(doc, "h1", ["Hello World"]);
|
||||
assertTextMany(doc, ".island", ["it works"]);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("support <Head /> with jsx precompile", async () => {
|
||||
await withFakeServe(
|
||||
"./tests/fixture_jsx_precompile/main.ts",
|
||||
async (server) => {
|
||||
const doc = await server.getHtml("/head");
|
||||
assertTextMany(doc, "h1", ["Hello World"]);
|
||||
assertTextMany(doc, "head title", ["foo"]);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user