mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 00:56:26 +08:00
fix: delay setAom on rootWorkspacesMetadataAtom (#2271)
This commit is contained in:
@@ -202,6 +202,8 @@ describe('useWorkspaces', () => {
|
||||
const { result } = renderHook(() => useAppHelper(), {
|
||||
wrapper: ProviderWrapper,
|
||||
});
|
||||
// next tick
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
{
|
||||
const workspaces = await store.get(workspacesAtom);
|
||||
expect(workspaces.length).toEqual(1);
|
||||
|
||||
Reference in New Issue
Block a user