@@ -587,7 +587,7 @@ describe('conditional skipping of asyncThunks', () => {
587587 const asyncThunk = createAsyncThunk ( 'test' , payloadCreator , { condition } )
588588 await asyncThunk ( arg ) ( dispatch , getState , extra )
589589
590- expect ( condition ) . toHaveBeenCalledTimes ( 1 )
590+ expect ( condition ) . toHaveBeenCalledOnce ( )
591591 expect ( condition ) . toHaveBeenLastCalledWith (
592592 arg ,
593593 expect . objectContaining ( { getState, extra } ) ,
@@ -598,7 +598,7 @@ describe('conditional skipping of asyncThunks', () => {
598598 const condition = ( ) => true
599599 const asyncThunk = createAsyncThunk ( 'test' , payloadCreator , { condition } )
600600 const thunkCallPromise = asyncThunk ( arg ) ( dispatch , getState , extra )
601- expect ( dispatch ) . toHaveBeenCalledTimes ( 1 )
601+ expect ( dispatch ) . toHaveBeenCalledOnce ( )
602602 await thunkCallPromise
603603 expect ( dispatch ) . toHaveBeenCalledTimes ( 2 )
604604 } )
@@ -614,7 +614,7 @@ describe('conditional skipping of asyncThunks', () => {
614614 const condition = ( ) => Promise . reject ( )
615615 const asyncThunk = createAsyncThunk ( 'test' , payloadCreator , { condition } )
616616 await asyncThunk ( arg ) ( dispatch , getState , extra )
617- expect ( dispatch ) . toHaveBeenCalledTimes ( 1 )
617+ expect ( dispatch ) . toHaveBeenCalledOnce ( )
618618 expect ( dispatch ) . toHaveBeenLastCalledWith (
619619 expect . objectContaining ( { type : 'test/rejected' } ) ,
620620 )
@@ -664,7 +664,7 @@ describe('conditional skipping of asyncThunks', () => {
664664 } )
665665 await asyncThunk ( arg ) ( dispatch , getState , extra )
666666
667- expect ( dispatch ) . toHaveBeenCalledTimes ( 1 )
667+ expect ( dispatch ) . toHaveBeenCalledOnce ( )
668668 expect ( dispatch ) . toHaveBeenLastCalledWith (
669669 expect . objectContaining ( {
670670 error : {
@@ -872,9 +872,9 @@ test('`condition` will see state changes from a synchronously invoked asyncThunk
872872 } )
873873
874874 store . dispatch ( asyncThunk ( { force : false } ) )
875- expect ( onStart ) . toHaveBeenCalledTimes ( 1 )
875+ expect ( onStart ) . toHaveBeenCalledOnce ( )
876876 store . dispatch ( asyncThunk ( { force : false } ) )
877- expect ( onStart ) . toHaveBeenCalledTimes ( 1 )
877+ expect ( onStart ) . toHaveBeenCalledOnce ( )
878878 store . dispatch ( asyncThunk ( { force : true } ) )
879879 expect ( onStart ) . toHaveBeenCalledTimes ( 2 )
880880} )
0 commit comments