Skip to content

Commit

Permalink
chore: add more tests to handlebars helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner authored Oct 17, 2023
1 parent 78ac2c0 commit f1094f4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/handlebars.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,15 @@ describe.concurrent("handlebars", () => {

expect(result).toEqual("helpers: false");
});

it("can use an or helper without an else statement", async (ctx) => {
const template = Handlebars.compile(
"{{#or POSTGRES_VERSION KAFKA_USAGE}} services:{{/or}}"
);
const result = template({
POSTGRES_VERSION: "14"
});

expect(result).toEqual(" services:");
});
});

0 comments on commit f1094f4

Please sign in to comment.