mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor: remove NoSsr on top level (#1951)
This commit is contained in:
18
scripts/setup/lottie-web.ts
Normal file
18
scripts/setup/lottie-web.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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(),
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user