From f22768920833341e20d31cc98723fcc019686fcb Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 1 Aug 2024 16:01:43 +0200 Subject: [PATCH] Merge test cases --- test/Logic/Tags/OptimizeTags.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/Logic/Tags/OptimizeTags.spec.ts b/test/Logic/Tags/OptimizeTags.spec.ts index 6c81ae124..94ca11bb9 100644 --- a/test/Logic/Tags/OptimizeTags.spec.ts +++ b/test/Logic/Tags/OptimizeTags.spec.ts @@ -181,6 +181,17 @@ describe("Tag optimalization", () => { const q = new And([new Tag("key", "value"), new RegexTag("key", /value/, true)]) expect(q.optimize()).toBe(false) }) + + it("should optimize comparing tags", () => { + const spec = TagUtils.Tag({ + and:[ + "x=5", + "x>5" + ] + }) + const opt = spec.optimize() + expect(opt).to.eq(false) + }) it("should optimize regexes in the key", () => { const spec = TagUtils.Tag({ and: [