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,8 +1,7 @@
import { describe } from "mocha"
import { expect } from "chai"
import AllImageProviders from "../../../Logic/ImageProviders/AllImageProviders"
import { UIEventSource } from "../../../Logic/UIEventSource"
import { Utils } from "../../../Utils"
import { describe, expect, it } from "vitest"
describe("ImageProviders", () => {
it("should work on a variaty of inputs", () => {
@ -16,9 +15,9 @@ describe("ImageProviders", () => {
if (img === undefined) {
throw "No image found"
}
expect(img.url).deep.equal(url)
expect(img.url).toEqual(url)
if (providerName) {
expect(providerName).deep.equal(img.provider.constructor.name)
expect(providerName).toEqual(img.provider.constructor.name)
}
console.log("OK")
})