mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 01:03:50 +02:00
refactor store
This commit is contained in:
@@ -11,17 +11,18 @@ vi.mock('../../service/request', () => ({
|
||||
}));
|
||||
|
||||
vi.mock('../../stores', () => ({
|
||||
useFavoriteStore: () => ({
|
||||
handleFavoriteAdd: (...args) => mockHandleFavoriteAdd(...args),
|
||||
handleFavoriteDelete: (...args) => mockHandleFavoriteDelete(...args),
|
||||
handleFavoriteGroupClear: (...args) =>
|
||||
mockHandleFavoriteGroupClear(...args)
|
||||
}),
|
||||
useUserStore: () => ({
|
||||
currentUser: { id: 'usr_me' }
|
||||
})
|
||||
}));
|
||||
|
||||
vi.mock('../../coordinators/favoriteCoordinator', () => ({
|
||||
handleFavoriteAdd: (...args) => mockHandleFavoriteAdd(...args),
|
||||
handleFavoriteDelete: (...args) => mockHandleFavoriteDelete(...args),
|
||||
handleFavoriteGroupClear: (...args) =>
|
||||
mockHandleFavoriteGroupClear(...args)
|
||||
}));
|
||||
|
||||
vi.mock('../../queries', () => ({
|
||||
queryClient: {
|
||||
invalidateQueries: (...args) => mockInvalidateQueries(...args)
|
||||
|
||||
@@ -6,6 +6,9 @@ const mockGetWorlds = vi.fn();
|
||||
const mockGetGroupCalendar = vi.fn();
|
||||
|
||||
vi.mock('../../queries', () => ({
|
||||
queryClient: {
|
||||
invalidateQueries: vi.fn().mockResolvedValue(undefined)
|
||||
},
|
||||
entityQueryPolicies: {
|
||||
user: { staleTime: 20000, gcTime: 90000, retry: 1, refetchOnWindowFocus: false },
|
||||
worldCollection: { staleTime: 60000, gcTime: 300000, retry: 1, refetchOnWindowFocus: false },
|
||||
|
||||
Reference in New Issue
Block a user