mapcomplete/test/Models/ThemeConfig/SourceConfig.spec.ts

19 lines
569 B
TypeScript
Raw Normal View History

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