Migrate batch of tests to vitest (#34111)
* Migrate batch of tests tro vitest * Iterate * Migrate another test * Fix lockfile
This commit is contained in:
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { vi } from "vitest";
|
||||
import { vi, expect as viExpect } from "vitest";
|
||||
import { mocked as jestMocked } from "jest-mock";
|
||||
|
||||
export const isJest = typeof jest !== "undefined";
|
||||
@@ -22,4 +22,7 @@ const adapter = {
|
||||
const mocked = adapter.mocked;
|
||||
export { adapter as vi, mocked };
|
||||
|
||||
const _expect = isJest ? (expect as unknown as typeof viExpect) : viExpect;
|
||||
export { _expect as expect };
|
||||
|
||||
export { type Mocked, type MockedObject } from "vitest";
|
||||
|
||||
Reference in New Issue
Block a user