From f1094f42d88e1dd863e156dfe8b4138dabed2b92 Mon Sep 17 00:00:00 2001 From: Blake Kostner Date: Tue, 17 Oct 2023 09:47:53 -0600 Subject: [PATCH] chore: add more tests to handlebars helpers --- src/handlebars.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/handlebars.test.ts b/src/handlebars.test.ts index 41b00f5..6f36cf1 100644 --- a/src/handlebars.test.ts +++ b/src/handlebars.test.ts @@ -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:"); + }); });