chore: fix and migrate unit tests to vitest
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user