test: working test with TypeScript + vite (using vitest)

This commit is contained in:
鲁树人 committed 2023-05-17 01:46:20 +01:00
1 parent 863a4e4f89
commit 0db84813ad
19 files changed
+687 -75

No files matched your search

+13 -8
View File
@@ -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'];