From fc6b01d9cde34c36da72fbeb71671d56a79b3a17 Mon Sep 17 00:00:00 2001 From: ihmpavel <42217494+ihmpavel@users.noreply.github.com> Date: Sat, 30 Jul 2022 09:16:19 +0200 Subject: [PATCH] chore: Add forgotten spaces --- .../admin/component/templates/reducer.js.hbs | 4 ++-- .../admin/component/templates/selectors.js.hbs | 2 +- .../admin/component/templates/tests/index.test.js.hbs | 2 +- .../component/templates/tests/reducer.test.js.hbs | 10 +++++----- .../component/templates/tests/selectors.test.js.hbs | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/generators/admin/component/templates/reducer.js.hbs b/packages/generators/admin/component/templates/reducer.js.hbs index b68e5d3de6..874dd6c699 100644 --- a/packages/generators/admin/component/templates/reducer.js.hbs +++ b/packages/generators/admin/component/templates/reducer.js.hbs @@ -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; diff --git a/packages/generators/admin/component/templates/selectors.js.hbs b/packages/generators/admin/component/templates/selectors.js.hbs index f0e4f9d7c5..f3bd345663 100644 --- a/packages/generators/admin/component/templates/selectors.js.hbs +++ b/packages/generators/admin/component/templates/selectors.js.hbs @@ -14,4 +14,4 @@ export const select{{ name }}Domain = state => state[` {{~else~}} ${pluginId} {{~/if~}} -_{{camelCase name}}`] || initialState; +_{{ camelCase name }}`] || initialState; diff --git a/packages/generators/admin/component/templates/tests/index.test.js.hbs b/packages/generators/admin/component/templates/tests/index.test.js.hbs index c3946b575f..4554f2e324 100644 --- a/packages/generators/admin/component/templates/tests/index.test.js.hbs +++ b/packages/generators/admin/component/templates/tests/index.test.js.hbs @@ -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 } = {}, ) => { diff --git a/packages/generators/admin/component/templates/tests/reducer.test.js.hbs b/packages/generators/admin/component/templates/tests/reducer.test.js.hbs index f9a71b3309..4deb3d781a 100644 --- a/packages/generators/admin/component/templates/tests/reducer.test.js.hbs +++ b/packages/generators/admin/component/templates/tests/reducer.test.js.hbs @@ -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); }); }); diff --git a/packages/generators/admin/component/templates/tests/selectors.test.js.hbs b/packages/generators/admin/component/templates/tests/selectors.test.js.hbs index 4e6cb3c0a0..9ea620841d 100644 --- a/packages/generators/admin/component/templates/tests/selectors.test.js.hbs +++ b/packages/generators/admin/component/templates/tests/selectors.test.js.hbs @@ -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 }}']); }); });