File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,12 @@ describe('Dev Tools Extension (Without Extension)', () => {
5757 beforeAll ( ( ) => {
5858 const useContextDevTools = require ( './index' ) . default ;
5959 dispatchFn = jest . fn ( ) ;
60- dispatchContext = useContextDevTools ( dispatchFn ) ;
60+ dispatchContext = useContextDevTools ( ) ;
6161 } ) ;
6262
6363 test ( 'Should initialize devTools' , ( ) => {
6464 dispatchContext . sendDispatch ( { } ) ;
65- expect ( dispatchFn ) . toHaveBeenCalledWith ( { } ) ;
65+ expect ( dispatchFn ) . not . toHaveBeenCalledWith ( { } ) ;
6666 } ) ;
6767
6868 test ( 'Should be able to send updated state' , ( ) => {
@@ -79,6 +79,7 @@ describe('Dev Tools Extension (Without Extension)', () => {
7979
8080 test ( 'Should be able to unsubscribe on tab close' , ( ) => {
8181 window . dispatchEvent ( new Event ( 'beforeunload' ) ) ;
82+ dispatchContext . disconnectDevTools ( ) ;
8283 expect ( devDisconnect ) . not . toHaveBeenCalled ( ) ;
8384 } ) ;
8485} )
You can’t perform that action at this time.
0 commit comments