feat: add helpers to make Fresh less TypeScripty (#1627)

This commit is contained in:
Marvin Hagemeister
2023-08-14 22:45:13 +02:00
committed by GitHub
parent 6436a43dce
commit 726740ed39
11 changed files with 157 additions and 13 deletions
+11
View File
@@ -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"]);
},
);
});