feat: add helpers to make Fresh less TypeScripty (#1627)
This commit is contained in:
@@ -171,3 +171,14 @@ Deno.test({
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test("define helpers", async () => {
|
||||
await withFresh(
|
||||
"./tests/fixture_define_helpers/main.ts",
|
||||
async (address) => {
|
||||
const doc = await fetchHtml(`${address}`);
|
||||
assertSelector(doc, "html > body > .app > .layout > .page");
|
||||
assertTextMany(doc, "p", ["Layout: it works", "Page: it works"]);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user