chore: Add forgotten spaces

This commit is contained in:
ihmpavel 2022-07-30 09:16:19 +02:00 committed by GitHub
parent 14d215c602
commit fc6b01d9cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@ import { DEFAULT_ACTION } from './constants';
export const initialState = {};
const {{camelCase name}}Reducer = (state = initialState, action) =>
const {{ camelCase name }}Reducer = (state = initialState, action) =>
// eslint-disable-next-line consistent-return
produce(state, draftState => {
switch (action.type) {
@ -21,4 +21,4 @@ const {{camelCase name}}Reducer = (state = initialState, action) =>
}
});
export default {{camelCase name}}Reducer;
export default {{ camelCase name }}Reducer;

View File

@ -14,4 +14,4 @@ export const select{{ name }}Domain = state => state[`
{{~else~}}
${pluginId}
{{~/if~}}
_{{camelCase name}}`] || initialState;
_{{ camelCase name }}`] || initialState;

View File

@ -25,7 +25,7 @@ import {{ name }} from '../index';
ui,
{
preloadedState = initialState,
store = createStore(rootReducer, { '{{ plugin }}_{{camelCase name}}': preloadedState }),
store = createStore(rootReducer, { '{{ plugin }}_{{ camelCase name }}': preloadedState }),
...renderOptions
} = {},
) => {

View File

@ -1,21 +1,21 @@
// import produce from 'immer';
import {{camelCase name}}Reducer, { initialState } from '../reducer';
import {{ camelCase name }}Reducer, { initialState } from '../reducer';
import { fixtures } from '../../../../../../../admin-test-utils';
// import { someAction } from '../actions';
/* eslint-disable default-case, no-param-reassign */
describe('{{camelCase name}}Reducer', () => {
describe('{{ camelCase name }}Reducer', () => {
let state;
beforeEach(() => {
state = {
...fixtures.store.state,
'{{ plugin }}_{{camelCase name}}': initialState,
'{{ plugin }}_{{ camelCase name }}': initialState,
};
});
it('returns the initial state', () => {
const expectedResult = state['{{ plugin }}_{{camelCase name}}'];
const expectedResult = state['{{ plugin }}_{{ camelCase name }}'];
expect({{camelCase name}}Reducer(undefined, {})).toEqual(expectedResult);
expect({{ camelCase name }}Reducer(undefined, {})).toEqual(expectedResult);
});
});

View File

@ -5,13 +5,13 @@ describe('select{{ name }}Domain', () => {
let store;
beforeEach(() => {
store = { ...fixtures.store.state, '{{ plugin }}_{{camelCase name}}': {} };
store = { ...fixtures.store.state, '{{ plugin }}_{{ camelCase name }}': {} };
});
it('expects to have unit tests specified', () => {
const actual = select{{ name }}Domain(store);
// TBC
expect(actual).toEqual(store['{{ plugin }}_{{camelCase name}}']);
expect(actual).toEqual(store['{{ plugin }}_{{ camelCase name }}']);
});
});