mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-14 20:52:58 +03:00
24 lines
475 B
TypeScript
24 lines
475 B
TypeScript
import { vi } from 'vitest';
|
|
|
|
vi.mock('lottie-web', () => ({
|
|
default: {},
|
|
}));
|
|
|
|
vi.mock('@blocksuite/presets', () => ({
|
|
AffineEditorContainer: vi.fn(),
|
|
BiDirectionalLinkPanel: vi.fn(),
|
|
DocMetaTags: vi.fn(),
|
|
DocTitle: vi.fn(),
|
|
EdgelessEditor: vi.fn(),
|
|
PageEditor: vi.fn(),
|
|
}));
|
|
|
|
if (typeof window !== 'undefined' && HTMLCanvasElement) {
|
|
// @ts-expect-error
|
|
HTMLCanvasElement.prototype.getContext = () => {
|
|
return {
|
|
fillRect: vi.fn(),
|
|
};
|
|
};
|
|
}
|