File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,18 @@ describe('unit testing for Action.jsx', () => {
11
11
let wrapper ;
12
12
const props = {
13
13
selected : true ,
14
- sliderIndex : 1 ,
15
- index : 1 ,
14
+ last : false ,
15
+ index : 2 ,
16
+ sliderIndex : 2 ,
16
17
dispatch : jest . fn ( ) ,
18
+ displayName : '3.0' ,
19
+ componentName : 'App' ,
20
+ componentData : {
21
+ actualDuration : 3.5 ,
22
+ } ,
23
+ state : { test : 'test' } ,
24
+ viewIndex : 2 ,
25
+ handleOnkeyDown : jest . fn ( ) ,
17
26
} ;
18
27
beforeEach ( ( ) => {
19
28
wrapper = shallow ( < Action { ...props } /> ) ;
@@ -32,7 +41,7 @@ describe('unit testing for Action.jsx', () => {
32
41
} ) ;
33
42
34
43
test ( 'should have a text that is equal to props.index' , ( ) => {
35
- expect ( wrapper . find ( '.action-component-text' ) . text ( ) ) . toEqual ( props . index . toString ( ) ) ;
44
+ expect ( wrapper . find ( '.action-component-text' ) . text ( ) ) . toEqual ( ` ${ props . displayName } : ${ props . componentName } ` ) ;
36
45
} ) ;
37
46
38
47
test ( 'should invoke dispatch method when clicked' , ( ) => {
You can’t perform that action at this time.
0 commit comments