Migrate batch of tests to vitest (#34121)

* Migrate batch of tests tro vitest

* Iterate

* Migrate another test

* Migrate batch of tests to vitest

* Iterate
This commit is contained in:
Michael Telatynski
2026-07-07 09:40:22 +00:00
committed by GitHub
parent 7ff6956014
commit 30c02ab5d7
19 changed files with 337 additions and 301 deletions
+4 -1
View File
@@ -17,7 +17,10 @@ const adapter = {
fn: isJest ? (jest.fn as unknown as typeof vi.fn) : vi.fn,
spyOn: isJest ? (jest.spyOn as unknown as typeof vi.spyOn) : vi.spyOn,
mocked: isJest ? (jestMocked as typeof vi.mocked) : vi.mocked,
} as Pick<typeof vi, "fn" | "spyOn" | "mocked">;
advanceTimersByTime: isJest
? (jest.advanceTimersByTime as unknown as typeof vi.advanceTimersByTime)
: vi.advanceTimersByTime,
} as Pick<typeof vi, "fn" | "spyOn" | "mocked" | "advanceTimersByTime">;
const mocked = adapter.mocked;
export { adapter as vi, mocked };