Files
AFFiNE-Mirror/scripts/setup/lottie-web.ts
Yifeng Wang af15aa06d4 feat: bump blocksuite (#5286)
Co-authored-by: donteatfriedrice <huisheng.chen7788@outlook.com>
2023-12-15 12:57:52 +08:00

19 lines
345 B
TypeScript

import { vi } from 'vitest';
vi.mock('lottie-web', () => ({
default: {},
}));
vi.mock('@blocksuite/presets', () => ({
AffineEditorContainer: vi.fn(),
}));
if (typeof window !== 'undefined' && HTMLCanvasElement) {
// @ts-expect-error
HTMLCanvasElement.prototype.getContext = () => {
return {
fillRect: vi.fn(),
};
};
}