forked from MapComplete/MapComplete
Merge test cases
This commit is contained in:
parent
1280ba2d14
commit
f227689208
1 changed files with 11 additions and 0 deletions
|
@ -181,6 +181,17 @@ describe("Tag optimalization", () => {
|
||||||
const q = new And([new Tag("key", "value"), new RegexTag("key", /value/, true)])
|
const q = new And([new Tag("key", "value"), new RegexTag("key", /value/, true)])
|
||||||
expect(q.optimize()).toBe(false)
|
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", () => {
|
it("should optimize regexes in the key", () => {
|
||||||
const spec = TagUtils.Tag({
|
const spec = TagUtils.Tag({
|
||||||
and: [
|
and: [
|
||||||
|
|
Loading…
Reference in a new issue