File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ describe('Unit testing for Diff.jsx', () => {
29
29
30
30
useStoreContext . mockImplementation ( ( ) => [ state ] ) ;
31
31
32
- const delta = { children : { } } ; // expect delta to be an obj
32
+ let delta = { children : { } } ; // expect delta to be an obj
33
33
const html = 'html' ; // expect html to be a string
34
- const previous = { state : 'string' , children : { } } ; // expect previous to be an obj
34
+ let previous = { state : 'string' , children : { } } ; // expect previous to be an obj
35
35
36
36
beforeEach ( ( ) => {
37
37
wrapper = shallow ( < Diff { ...props } /> ) ;
@@ -65,9 +65,8 @@ describe('Unit testing for Diff.jsx', () => {
65
65
it ( 'Check if Diff component inner text value is a string' , ( ) => {
66
66
expect ( typeof wrapper . text ( ) ) . toEqual ( 'string' ) ;
67
67
} ) ;
68
- xit ( 'Check if Diff component div has a className noState ' , ( ) => {
69
- console . log ( wrapper . props ( ) ) ;
70
- expect ( wrapper . props ( ) . className ) . toEqual ( 'noState' ) ;
68
+ it ( 'Check if previous and delta is defined Diff should not have text content "No state change detected. Trigger an event to change state"' , ( ) => {
69
+ expect ( wrapper . textContent ) . not . toEqual ( 'No state change detected. Trigger an event to change state' ) ;
71
70
} ) ;
72
71
} ) ;
73
72
You can’t perform that action at this time.
0 commit comments