mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 10:10:42 +08:00
392fef663e
## Features - https://github.com/toeverything/BlockSuite/pull/8115 @EYHN ## Bugfix - https://github.com/toeverything/BlockSuite/pull/8119 @L-Sun - https://github.com/toeverything/BlockSuite/pull/8117 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/8114 @donteatfriedrice ## Misc - https://github.com/toeverything/BlockSuite/pull/8106 @fundon - https://github.com/toeverything/BlockSuite/pull/8116 @doodlewind
34 lines
662 B
TypeScript
34 lines
662 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(),
|
|
AIChatBlockSchema: {
|
|
version: 1,
|
|
model: {
|
|
version: 1,
|
|
flavour: 'affine:embed-ai-chat',
|
|
role: 'content',
|
|
children: [],
|
|
},
|
|
},
|
|
AIChatBlockSpec: {},
|
|
}));
|
|
|
|
if (typeof window !== 'undefined' && HTMLCanvasElement) {
|
|
// @ts-expect-error
|
|
HTMLCanvasElement.prototype.getContext = () => {
|
|
return {
|
|
fillRect: vi.fn(),
|
|
};
|
|
};
|
|
}
|