Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit 959f0e6

Browse files
committed
🐛 Fix generated container index.test.tsx
1 parent ca2fc39 commit 959f0e6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internals/generators/container/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ module.exports = {
6767
},
6868
],
6969
actions: data => {
70-
// Generate index.js and index.test.js
70+
// Generate index.ts and index.test.tsx
7171
const actions = [
7272
{
7373
type: 'add',
@@ -81,7 +81,7 @@ module.exports = {
8181
if (data.wantMessages) {
8282
actions.push({
8383
type: 'add',
84-
path: '../../app/containers/{{properCase name}}/tests/index.test.ts',
84+
path: '../../app/containers/{{properCase name}}/tests/index.test.tsx',
8585
templateFile: './container/test.tsx.hbs',
8686
abortOnFail: true,
8787
});
@@ -97,8 +97,8 @@ module.exports = {
9797
});
9898
}
9999

100-
// If they want actions and a reducer, generate actions.js, constants.js,
101-
// reducer.js and the corresponding tests for actions and the reducer
100+
// If they want actions and a reducer, generate actions.ts, constants.ts,
101+
// reducer.ts and the corresponding tests for actions and the reducer
102102
if (data.wantActionsAndReducer) {
103103
// Actions
104104
actions.push({

internals/generators/container/test.tsx.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { render } from '@testing-library/react';
1212
import { IntlProvider } from 'react-intl';
1313
{{/if}}
1414
import { Provider } from 'react-redux';
15-
import { browserHistory } from 'react-router-dom';
15+
import history from 'utils/history';
1616

1717
import {{ properCase name }} from '../index';
1818
{{#if wantMessages}}
@@ -23,7 +23,7 @@ describe('<{{ properCase name }} />', () => {
2323
let store;
2424

2525
beforeEach(() => {
26-
store = configureStore({}, browserHistory);
26+
store = configureStore({}, history);
2727
});
2828

2929
it('Expect to not log errors in console', () => {

0 commit comments

Comments
 (0)