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: [