Formatting

This commit is contained in:
Pieter Vander Vennet 2023-06-01 14:40:54 +02:00
parent 39deec76d2
commit d2f4df3b60
5 changed files with 82 additions and 72 deletions

View file

@ -1,10 +1,10 @@
import {TagsFilter} from "../../../Logic/Tags/TagsFilter"
import {And} from "../../../Logic/Tags/And"
import {Tag} from "../../../Logic/Tags/Tag"
import {TagUtils} from "../../../Logic/Tags/TagUtils"
import {Or} from "../../../Logic/Tags/Or"
import {RegexTag} from "../../../Logic/Tags/RegexTag"
import {describe, expect, it} from "vitest"
import { TagsFilter } from "../../../Logic/Tags/TagsFilter"
import { And } from "../../../Logic/Tags/And"
import { Tag } from "../../../Logic/Tags/Tag"
import { TagUtils } from "../../../Logic/Tags/TagUtils"
import { Or } from "../../../Logic/Tags/Or"
import { RegexTag } from "../../../Logic/Tags/RegexTag"
import { describe, expect, it } from "vitest"
describe("Tag optimalization", () => {
describe("And", () => {
@ -76,7 +76,6 @@ describe("Tag optimalization", () => {
const opt = t.optimize()
expect(typeof opt !== "boolean").true
expect(TagUtils.toString(<TagsFilter>opt)).toBe("shop=sports")
})
it("should optimize nested ORs", () => {
@ -271,7 +270,7 @@ describe("Tag optimalization", () => {
or: [
"club=climbing",
{
and: ["sport=climbing", {or: ["club~*", "office~*"]}],
and: ["sport=climbing", { or: ["club~*", "office~*"] }],
},
{
and: [