Skip to content

Commit

Permalink
ci: improves test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dresende committed Feb 5, 2024
1 parent eb4025e commit 8530586
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ describe("Features", () => {
view({ name: "world" }).should.equal("<h3>\n\tHello world\n</h3>");
});

it("<% include %> can be called with no arguments", async () => {
const view1 = await keikan.compileData("<% include test/views/label() %>");
const view2 = await keikan.compileData("<% include test/views/label() %>", { debug: false });

view1().should.equal("Hello undefined");
view2().should.equal("Hello undefined");
});

it("<% include %> will return an <error/> if not found", async () => {
const view = await keikan.compilePath(import.meta.dirname + "/views/has-bad-include");

Expand Down

0 comments on commit 8530586

Please sign in to comment.