mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
refactor store
This commit is contained in:
@@ -8,9 +8,13 @@ const mocks = vi.hoisted(() => ({
|
||||
te: vi.fn((key) => key === 'view.moderation.filters.block')
|
||||
}));
|
||||
|
||||
vi.mock('pinia', () => ({
|
||||
storeToRefs: (store) => store
|
||||
}));
|
||||
vi.mock('pinia', async (importOriginal) => {
|
||||
const actual = await importOriginal();
|
||||
return {
|
||||
...actual,
|
||||
storeToRefs: (store) => store
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock('../../../plugin', () => ({
|
||||
i18n: {
|
||||
@@ -26,11 +30,14 @@ vi.mock('../../../stores', () => ({
|
||||
shiftHeld: mocks.shiftHeld
|
||||
}),
|
||||
useUserStore: () => ({
|
||||
currentUser: mocks.currentUser,
|
||||
showUserDialog: (...args) => mocks.showUserDialog(...args)
|
||||
currentUser: mocks.currentUser
|
||||
})
|
||||
}));
|
||||
|
||||
vi.mock('../../../coordinators/userCoordinator', () => ({
|
||||
showUserDialog: (...args) => mocks.showUserDialog(...args)
|
||||
}));
|
||||
|
||||
vi.mock('../../../shared/utils', () => ({
|
||||
formatDateFilter: (value, format) => `${format}:${value}`
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user