2021-07-21 20:08:17 +02:00
|
|
|
// import produce from 'immer';
|
|
|
|
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 */
|
|
|
|
describe('{{camelCase name}}Reducer', () => {
|
|
|
|
let state;
|
|
|
|
beforeEach(() => {
|
|
|
|
state = {
|
|
|
|
...fixtures.store.state,
|
2021-07-22 14:10:54 +02:00
|
|
|
'{{plugin}}_{{camelCase name}}': initialState,
|
2021-07-21 20:08:17 +02:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
it('returns the initial state', () => {
|
2021-07-23 12:32:58 +02:00
|
|
|
const expectedResult = state['{{plugin}}_{{camelCase name}}'];
|
2021-07-21 20:08:17 +02:00
|
|
|
|
|
|
|
expect({{camelCase name}}Reducer(undefined, {})).toEqual(expectedResult);
|
|
|
|
});
|
|
|
|
});
|