This repository was archived by the owner on Sep 6, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
internals/generators/container Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ module.exports = {
67
67
} ,
68
68
] ,
69
69
actions : data => {
70
- // Generate index.js and index.test.js
70
+ // Generate index.ts and index.test.tsx
71
71
const actions = [
72
72
{
73
73
type : 'add' ,
@@ -81,7 +81,7 @@ module.exports = {
81
81
if ( data . wantMessages ) {
82
82
actions . push ( {
83
83
type : 'add' ,
84
- path : '../../app/containers/{{properCase name}}/tests/index.test.ts ' ,
84
+ path : '../../app/containers/{{properCase name}}/tests/index.test.tsx ' ,
85
85
templateFile : './container/test.tsx.hbs' ,
86
86
abortOnFail : true ,
87
87
} ) ;
@@ -97,8 +97,8 @@ module.exports = {
97
97
} ) ;
98
98
}
99
99
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
102
102
if ( data . wantActionsAndReducer ) {
103
103
// Actions
104
104
actions . push ( {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { render } from '@testing-library/react';
12
12
import { IntlProvider } from 'react-intl';
13
13
{{ /if }}
14
14
import { Provider } from 'react-redux';
15
- import { browserHistory } from 'react-router-dom ';
15
+ import history from 'utils/history ';
16
16
17
17
import {{ properCase name }} from '../index';
18
18
{{ #if wantMessages }}
@@ -23,7 +23,7 @@ describe('<{{ properCase name }} />', () => {
23
23
let store;
24
24
25
25
beforeEach(() => {
26
- store = configureStore({}, browserHistory );
26
+ store = configureStore({}, history );
27
27
});
28
28
29
29
it('Expect to not log errors in console', () => {
You can’t perform that action at this time.
0 commit comments