@wix/design-system
Version:
@wix/design-system
10 lines • 616 B
JavaScript
// jest-canvas-mock calls `jest.fn()` at module-evaluation time. Under vitest the
// equivalent API is `vi`. This module aliases it onto the global so the symbol
// exists when jest-canvas-mock loads. It lives in its own module (imported
// before 'jest-canvas-mock' in vitest-setup) because ES module imports are
// evaluated in source order — a plain assignment in the setup file would run
// after the hoisted jest-canvas-mock import, too late to help.
import { vi } from 'vitest';
// @ts-expect-error jest compat shim for jest-canvas-mock
globalThis.jest = vi;
//# sourceMappingURL=jest-canvas-mock-shim.js.map