2021-07-21 20:08:17 +02:00
|
|
|
// import produce from 'immer';
|
2022-07-30 09:16:19 +02:00
|
|
|
import {{ camelCase name }}Reducer, { initialState } from '../reducer';
|
2021-07-23 12:32:58 +02:00
|
|
|
import { fixtures } from '../../../../../../../admin-test-utils';
|
2021-07-21 20:08:17 +02:00
|
|
|
// import { someAction } from '../actions';
|
|
|
|
|
|
|
|
/* eslint-disable default-case, no-param-reassign */
|
2022-07-30 09:16:19 +02:00
|
|
|
describe('{{ camelCase name }}Reducer', () => {
|
2021-07-21 20:08:17 +02:00
|
|
|
let state;
|
|
|
|
beforeEach(() => {
|
|
|
|
state = {
|
|
|
|
...fixtures.store.state,
|
2022-07-30 09:16:19 +02:00
|
|
|
'{{ plugin }}_{{ camelCase name }}': initialState,
|
2021-07-21 20:08:17 +02:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
it('returns the initial state', () => {
|
2022-07-30 09:16:19 +02:00
|
|
|
const expectedResult = state['{{ plugin }}_{{ camelCase name }}'];
|
2021-07-21 20:08:17 +02:00
|
|
|
|
2022-07-30 09:16:19 +02:00
|
|
|
expect({{ camelCase name }}Reducer(undefined, {})).toEqual(expectedResult);
|
2021-07-21 20:08:17 +02:00
|
|
|
});
|
|
|
|
});
|