mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
20 lines
574 B
TypeScript
20 lines
574 B
TypeScript
import reducer from '@joplin/lib/reducer';
|
|
import { createStore } from 'redux';
|
|
import appDefaultState from '../appDefaultState';
|
|
import Setting from '@joplin/lib/models/Setting';
|
|
|
|
const defaultState = {
|
|
...appDefaultState,
|
|
// Mocking theme in the default state is necessary to prevent "Theme not set!" warnings.
|
|
settings: { theme: Setting.THEME_LIGHT },
|
|
};
|
|
|
|
const testReducer = (state = defaultState, action: unknown) => {
|
|
return reducer(state, action);
|
|
};
|
|
|
|
const createMockReduxStore = () => {
|
|
return createStore(testReducer);
|
|
};
|
|
export default createMockReduxStore;
|