Skip to content

Commit

Permalink
fix: update handlebars or statement variable usage
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner authored Feb 20, 2024
1 parent bc31730 commit 6e21087
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 @@ -39,4 +39,15 @@ describe.concurrent("handlebars", () => {

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

it("allows statements in block", async (ctx) => {
const template = Handlebars.compile(
"{{#or POSTGRES_VERSION KAFKA_USAGE}}{{#if POSTGRES_VERSION}}POSTGRES{{/if}}{{#if KAFKA_USAGE}}KAFKA{{/if}}{{/or}}"
);
const result = template({
POSTGRES_VERSION: "14"
});

expect(result).toEqual("POSTGRES");
});
});

0 comments on commit 6e21087

Please sign in to comment.