Skip to content

Commit 0c92bcb

Browse files
committed
ci: improves test coverage
1 parent 0b8f49a commit 0c92bcb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/Features.js

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ describe("Features", () => {
1616
view().should.equal("<h3>\n\t<error>Include not found: notfound</error>\n</h3>");
1717
});
1818

19+
it("<% include %> used in compileData will use process cwd", async () => {
20+
const view = await keikan.compileData("<% include label() %>");
21+
22+
view().should.equal("<error>Include not found: label</error>");
23+
});
24+
1925
it("<%= %>, <%- %> and <%# %>", async () => {
2026
const view = await keikan.compilePath(import.meta.dirname + "/views/escaping");
2127

test/Renderer.js

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ describe("Renderer", () => {
1414
view.should.be.instanceOf(Promise);
1515
});
1616

17+
it("compileData handles code", async () => {
18+
const view = await keikan.compileData("<h3><% if (true) { %>hello world<% } %></h3>");
19+
20+
view().should.be.equal("<h3>hello world</h3>");
21+
});
22+
1723
it("exposes a compilePath method", () => {
1824
keikan.compilePath.should.be.of.type("function");
1925
});

0 commit comments

Comments
 (0)