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', () => {
2929
3030 useStoreContext . mockImplementation ( ( ) => [ state ] ) ;
3131
32- const delta = { children : { } } ; // expect delta to be an obj
32+ let delta = { children : { } } ; // expect delta to be an obj
3333 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
3535
3636 beforeEach ( ( ) => {
3737 wrapper = shallow ( < Diff { ...props } /> ) ;
@@ -65,9 +65,8 @@ describe('Unit testing for Diff.jsx', () => {
6565 it ( 'Check if Diff component inner text value is a string' , ( ) => {
6666 expect ( typeof wrapper . text ( ) ) . toEqual ( 'string' ) ;
6767 } ) ;
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' ) ;
7170 } ) ;
7271 } ) ;
7372
You can’t perform that action at this time.
0 commit comments