mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-27 15:46:59 +00:00
test: working test with TypeScript + vite (using vitest)
This commit is contained in:
1 parent
863a4e4f89
commit
0db84813ad
19 files changed
+687
-75
No files matched your search
+13
-8
@@ -1,11 +1,16 @@
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
import fileListing from './features/file-listing/fileListingSlice';
|
||||
import { PreloadedState, combineReducers, configureStore } from '@reduxjs/toolkit';
|
||||
import fileListingReducer from './features/file-listing/fileListingSlice';
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
fileListing: fileListing,
|
||||
},
|
||||
const rootReducer = combineReducers({
|
||||
fileListing: fileListingReducer,
|
||||
});
|
||||
|
||||
export type RootState = ReturnType<typeof store.getState>;
|
||||
export type AppDispatch = typeof store.dispatch;
|
||||
export const setupStore = (preloadedState?: PreloadedState<RootState>) =>
|
||||
configureStore({
|
||||
reducer: rootReducer,
|
||||
preloadedState,
|
||||
});
|
||||
|
||||
export type RootState = ReturnType<typeof rootReducer>;
|
||||
export type AppStore = ReturnType<typeof setupStore>;
|
||||
export type AppDispatch = AppStore['dispatch'];
|
||||
Reference in new issue
Block a user