chore: fix and migrate unit tests to vitest

This commit is contained in:
Christian Andolf
2025-06-27 13:35:41 +02:00
parent a91c28096d
commit ff40ef72c4
26 changed files with 818 additions and 2835 deletions

View File

@@ -1,4 +1,4 @@
import { beforeAll, describe, expect, it } from "@jest/globals"
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest"
import { getValidFromDate, getValidToDate } from "./getValidDates"
@@ -6,11 +6,11 @@ const NOW = new Date("2020-10-01T00:00:00Z")
describe("getValidFromDate", () => {
beforeAll(() => {
jest.useFakeTimers({ now: NOW })
vi.useFakeTimers({ now: NOW })
})
afterAll(() => {
jest.useRealTimers()
vi.useRealTimers()
})
describe("getValidFromDate", () => {