forked from MapComplete/MapComplete
Tests: add regression test for regex
This commit is contained in:
parent
84cbd2fbc0
commit
418e52575a
1 changed files with 12 additions and 3 deletions
|
@ -45,4 +45,13 @@ describe("TagUtils", () => {
|
|||
expect(filter.matchesProperties({ date_created: "2022-01-01" })).toBe(true)
|
||||
})
|
||||
})
|
||||
describe("regextag", () => {
|
||||
it("should match tags", () => {
|
||||
const t = TagUtils.Tag( "_tags~(^|.*;)leisure=picnic_table($|;.*)")
|
||||
const properties = {
|
||||
_tags: 'leisure=picnic_table'
|
||||
}
|
||||
expect(t.matchesProperties(properties)).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue