diff --git a/test/Logic/Tags/TagUtils.spec.ts b/test/Logic/Tags/TagUtils.spec.ts index f0debd559..99f690d0f 100644 --- a/test/Logic/Tags/TagUtils.spec.ts +++ b/test/Logic/Tags/TagUtils.spec.ts @@ -1,6 +1,6 @@ -import { TagUtils } from "../../../Logic/Tags/TagUtils" -import { equal } from "assert" -import { describe, expect, it } from "vitest" +import {TagUtils} from "../../../Logic/Tags/TagUtils" +import {equal} from "assert" +import {describe, expect, it} from "vitest" describe("TagUtils", () => { describe("ParseTag", () => { @@ -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) + }) + }) })