refactor: remove deprecated atoms (#2615)

This commit is contained in:
Himself65
2023-05-31 14:54:59 +08:00
committed by himself65
parent a4ae5e3141
commit ab56d15f7b
7 changed files with 23 additions and 45 deletions
+3 -5
View File
@@ -23,11 +23,9 @@ import type React from 'react';
import { beforeAll, beforeEach, describe, expect, test, vi } from 'vitest';
import { workspacesAtom } from '../../atoms';
import { rootCurrentWorkspaceAtom } from '../../atoms/root';
import { BlockSuiteWorkspace } from '../../shared';
import {
currentWorkspaceAtom,
useCurrentWorkspace,
} from '../current/use-current-workspace';
import { useCurrentWorkspace } from '../current/use-current-workspace';
import { useAppHelper, useWorkspaces } from '../use-workspaces';
vi.mock(
@@ -169,7 +167,7 @@ describe('useWorkspacesHelper', () => {
wrapper: ProviderWrapper,
});
store.set(rootCurrentWorkspaceIdAtom, workspacesHook.result.current[1].id);
await store.get(currentWorkspaceAtom);
await store.get(rootCurrentWorkspaceAtom);
const currentWorkspaceHook = renderHook(() => useCurrentWorkspace(), {
wrapper: ProviderWrapper,
});