mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
chore(editor): move legacy doc collection to test workspace (#9507)
This commit is contained in:
@@ -6,20 +6,21 @@ import 'fake-indexeddb/auto';
|
||||
import { AffineSchemas } from '@blocksuite/affine/blocks/schemas';
|
||||
import { assertExists } from '@blocksuite/affine/global/utils';
|
||||
import type { Doc } from '@blocksuite/affine/store';
|
||||
import { DocCollection, Schema } from '@blocksuite/affine/store';
|
||||
import { Schema } from '@blocksuite/store';
|
||||
import { TestWorkspace } from '@blocksuite/store/test';
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
|
||||
import { useBlockSuitePagePreview } from '../use-block-suite-page-preview';
|
||||
let docCollection: DocCollection;
|
||||
let docCollection: TestWorkspace;
|
||||
|
||||
const schema = new Schema();
|
||||
schema.register(AffineSchemas);
|
||||
|
||||
beforeEach(async () => {
|
||||
vi.useFakeTimers({ toFake: ['requestIdleCallback'] });
|
||||
docCollection = new DocCollection({ id: 'test', schema });
|
||||
docCollection = new TestWorkspace({ id: 'test', schema });
|
||||
docCollection.meta.initialize();
|
||||
const initPage = async (page: Doc) => {
|
||||
page.load();
|
||||
|
||||
Reference in New Issue
Block a user