mapcomplete/test/UI/SpecialVisualisations.spec.ts

25 lines
862 B
TypeScript
Raw Normal View History

2023-07-15 18:55:03 +02:00
import SpecialVisualizations from "../../src/UI/SpecialVisualizations"
2023-02-03 04:48:32 +01:00
import { describe, expect, it } from "vitest"
describe("SpecialVisualisations", () => {
describe("predifined special visualisations", () => {
it("should not have an argument called 'type'", () => {
const specials = SpecialVisualizations.specialVisualizations
for (const special of specials) {
2023-02-03 04:48:32 +01:00
expect(special.funcName).not.toBe("type")
2022-11-02 14:44:06 +01:00
if (special.args === undefined) {
throw (
"The field 'args' is undefined for special visualisation " +
special.funcName
)
}
for (const arg of special.args) {
2023-02-03 04:48:32 +01:00
expect(arg.name).not.toBe("type")
}
}
})
})
2022-09-08 21:40:48 +02:00
})