mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-24 10:34:08 +03:00
19 lines
338 B
TypeScript
19 lines
338 B
TypeScript
import { vi } from 'vitest';
|
|
|
|
vi.mock('lottie-web', () => ({
|
|
default: {},
|
|
}));
|
|
|
|
vi.mock('@blocksuite/editor', () => ({
|
|
EditorContainer: vi.fn(),
|
|
}));
|
|
|
|
if (typeof window !== 'undefined' && HTMLCanvasElement) {
|
|
// @ts-expect-error
|
|
HTMLCanvasElement.prototype.getContext = () => {
|
|
return {
|
|
fillRect: vi.fn(),
|
|
};
|
|
};
|
|
}
|