From ca9d09c86a02ded9fd255bf495086f67ef87b7bb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 17 Feb 2025 12:51:13 +0100 Subject: [PATCH] Fix tests --- .../CodeEditor/validator/tests/hbs.spec.ts | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/components/common/CodeEditor/validator/tests/hbs.spec.ts b/packages/builder/src/components/common/CodeEditor/validator/tests/hbs.spec.ts index a75f50eed9..9484c7a4a5 100644 --- a/packages/builder/src/components/common/CodeEditor/validator/tests/hbs.spec.ts +++ b/packages/builder/src/components/common/CodeEditor/validator/tests/hbs.spec.ts @@ -30,21 +30,15 @@ describe("hbs validator", () => { expect(result).toHaveLength(0) }) - it("throws on invalid expressions", () => { + it("does not throw on missing validations", () => { const text = "{{ anotherFieldName }}" const result = validateHbsTemplate(text, validators) - expect(result).toEqual([ - { - from: 0, - message: `"anotherFieldName" handler does not exist.`, - severity: "warning", - to: 22, - }, - ]) + expect(result).toHaveLength(0) }) - it("throws on untrimmed invalid expressions", () => { + // Waiting for missing fields validation + it.skip("throws on untrimmed invalid expressions", () => { const text = " {{ anotherFieldName }}" const result = validateHbsTemplate(text, validators) @@ -58,7 +52,8 @@ describe("hbs validator", () => { ]) }) - it("throws on invalid expressions between valid lines", () => { + // Waiting for missing fields validation + it.skip("throws on invalid expressions between valid lines", () => { const text = "literal expression\nthe value is {{ anotherFieldName }}\nanother expression" @@ -85,7 +80,8 @@ describe("hbs validator", () => { expect(result).toHaveLength(0) }) - it("throws if not wrapped between brackets", () => { + // Waiting for missing fields validation + it.skip("throws if not wrapped between brackets", () => { const text = `{{ field name }}` const result = validateHbsTemplate(text, validators)