2023-07-15 18:55:03 +02:00
|
|
|
import SourceConfig from "../../../src/Models/ThemeConfig/SourceConfig"
|
|
|
|
import { TagUtils } from "../../../src/Logic/Tags/TagUtils"
|
2023-02-03 04:48:32 +01:00
|
|
|
import { describe, expect, it } from "vitest"
|
2022-04-14 00:53:38 +02:00
|
|
|
|
|
|
|
describe("SourceConfig", () => {
|
|
|
|
it("should throw an error on conflicting tags", () => {
|
|
|
|
expect(() => {
|
|
|
|
new SourceConfig(
|
|
|
|
{
|
|
|
|
osmTags: TagUtils.Tag({
|
|
|
|
and: ["x=y", "a=b", "x!=y"],
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
false
|
|
|
|
)
|
2023-02-03 04:48:32 +01:00
|
|
|
}).toThrowError(/tags are conflicting/)
|
2022-04-14 00:53:38 +02:00
|
|
|
})
|
|
|
|
})
|