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,7 +1,6 @@
import { describe } from "mocha"
import { expect } from "chai"
import LayoutConfig from "../../../../Models/ThemeConfig/LayoutConfig"
import { FixLegacyTheme } from "../../../../Models/ThemeConfig/Conversion/LegacyJsonConvert"
import { describe, expect, it } from "vitest"
describe("FixLegacyTheme", () => {
it("should create a working theme config", () => {
@ -135,8 +134,9 @@ describe("FixLegacyTheme", () => {
],
}
const fixed = new FixLegacyTheme().convert(<any>walking_node_theme, "While testing")
expect(fixed.errors, "Could not fix the legacy theme").empty
// "Could not fix the legacy theme"
expect(fixed.errors).empty
const theme = new LayoutConfig(fixed.result, false)
expect(theme).not.undefined
expect(theme).toBeDefined()
})
})