Port tests to vitest

This commit is contained in:
Pieter Vander Vennet 2023-02-03 04:48:32 +01:00
parent 64a4d7e929
commit 228ceb120d
33 changed files with 673 additions and 326 deletions

View file

@ -1,16 +1,12 @@
import { describe } from "mocha"
import SpecialVisualizations from "../../UI/SpecialVisualizations"
import { expect } from "chai"
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) {
expect(special.funcName).not.eq(
"type",
"A special visualisation is not allowed to be named 'type', as this will conflict with the 'special'-blocks"
)
expect(special.funcName).not.toBe("type")
if (special.args === undefined) {
throw (
@ -20,10 +16,7 @@ describe("SpecialVisualisations", () => {
}
for (const arg of special.args) {
expect(arg.name).not.eq(
"type",
"An argument is not allowed to be called 'type', as this will conflict with the 'special'-blocks"
)
expect(arg.name).not.toBe("type")
}
}
})