34 lines
439 B
TypeScript
34 lines
439 B
TypeScript
import {
|
|
afterAll,
|
|
afterEach,
|
|
beforeAll,
|
|
beforeEach,
|
|
describe,
|
|
expect,
|
|
it,
|
|
vi,
|
|
} from "vitest";
|
|
|
|
type Mock = typeof vi.fn & {
|
|
module: typeof vi.mock;
|
|
};
|
|
|
|
const mock = Object.assign(
|
|
((implementation?: Parameters<typeof vi.fn>[0]) =>
|
|
vi.fn(implementation)) as typeof vi.fn,
|
|
{
|
|
module: vi.mock,
|
|
},
|
|
) as Mock;
|
|
|
|
export {
|
|
afterAll,
|
|
afterEach,
|
|
beforeAll,
|
|
beforeEach,
|
|
describe,
|
|
expect,
|
|
it,
|
|
mock,
|
|
};
|