From e34257a018f8fd47a3069c4d2186a739fd491220 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 22 Jul 2024 18:22:04 +0100 Subject: [PATCH] One more fix. --- packages/string-templates/test/hbsToJs.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/string-templates/test/hbsToJs.spec.ts b/packages/string-templates/test/hbsToJs.spec.ts index ea375064a1..ae071cfe37 100644 --- a/packages/string-templates/test/hbsToJs.spec.ts +++ b/packages/string-templates/test/hbsToJs.spec.ts @@ -93,10 +93,10 @@ describe("Test that the string processing works correctly", () => { it("should handle a complex statement", () => { const response = convertToJS( - "This is the average: {{ join ( avg val1 val2 val3 ) val4 }}" + "This is the average: {{ join val1 ( avg val2 val3 val4 ) }}" ) checkLines(response, [ - 'const var1 = helpers.join(helpers.avg($("val1"), $("val2"), $("val3")), $("val4"));', + 'const var1 = helpers.join($("val1"), helpers.avg($("val2"), $("val3"), $("val4")));', "return `This is the average: ${var1}`;", ]) }) @@ -119,10 +119,10 @@ describe("Test that the string processing works correctly", () => { it("should handle multiple complex statements", () => { const response = convertToJS( - "average: {{ avg ( abs val1 ) val2 }} add: {{ add 1 2 }}" + "average: {{ avg val1 ( abs val2 ) }} add: {{ add 1 2 }}" ) checkLines(response, [ - 'const var1 = helpers.avg(helpers.abs($("val1")), $("val2"));', + 'const var1 = helpers.avg($("val1"), helpers.abs($("val2")));', "const var2 = helpers.add(1, 2);", "return `average: ${var1} add: ${var2}`;", ])