File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
source/components/GlobalNavigation/components/Notifications Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ShallowRenderer from 'react-test-renderer/shallow' ;
3
2
import merge from 'lodash/merge' ;
4
3
import { render } from '@testing-library/react' ;
5
4
@@ -38,9 +37,7 @@ jest.mock('../../context/UserContext', () => ({
38
37
39
38
jest . mock ( 'react-i18next' , ( ) => ( {
40
39
...jest . requireActual ( 'react-i18next' ) ,
41
- useTranslation : ( ) => [ jest . fn ( ( key , params ) => {
42
- return `${ key } ${ params ? JSON . stringify ( params ) : '' } ` ;
43
- } ) ] ,
40
+ useTranslation : ( ) => [ jest . fn ( ( key , params ) => `${ key } ${ params ? JSON . stringify ( params ) : '' } ` ) ] ,
44
41
} ) ) ;
45
42
46
43
const defaultProps = {
@@ -63,7 +60,7 @@ const defaultProps = {
63
60
function renderComponent ( props ) {
64
61
const computedProps = merge ( { } , defaultProps , props ) ;
65
62
66
- const { container} = render ( < CardText { ...computedProps } /> ) ;
63
+ const { container } = render ( < CardText { ...computedProps } /> ) ;
67
64
68
65
return container . firstChild ;
69
66
}
You can’t perform that action at this time.
0 commit comments