@@ -586,7 +586,7 @@ describe('conditional skipping of asyncThunks', () => {
586586 const asyncThunk = createAsyncThunk ( 'test' , payloadCreator , { condition } )
587587 await asyncThunk ( arg ) ( dispatch , getState , extra )
588588
589- expect ( condition ) . toHaveBeenCalledTimes ( 1 )
589+ expect ( condition ) . toHaveBeenCalledOnce ( )
590590 expect ( condition ) . toHaveBeenLastCalledWith (
591591 arg ,
592592 expect . objectContaining ( { getState, extra } ) ,
@@ -597,7 +597,7 @@ describe('conditional skipping of asyncThunks', () => {
597597 const condition = ( ) => true
598598 const asyncThunk = createAsyncThunk ( 'test' , payloadCreator , { condition } )
599599 const thunkCallPromise = asyncThunk ( arg ) ( dispatch , getState , extra )
600- expect ( dispatch ) . toHaveBeenCalledTimes ( 1 )
600+ expect ( dispatch ) . toHaveBeenCalledOnce ( )
601601 await thunkCallPromise
602602 expect ( dispatch ) . toHaveBeenCalledTimes ( 2 )
603603 } )
@@ -613,7 +613,7 @@ describe('conditional skipping of asyncThunks', () => {
613613 const condition = ( ) => Promise . reject ( )
614614 const asyncThunk = createAsyncThunk ( 'test' , payloadCreator , { condition } )
615615 await asyncThunk ( arg ) ( dispatch , getState , extra )
616- expect ( dispatch ) . toHaveBeenCalledTimes ( 1 )
616+ expect ( dispatch ) . toHaveBeenCalledOnce ( )
617617 expect ( dispatch ) . toHaveBeenLastCalledWith (
618618 expect . objectContaining ( { type : 'test/rejected' } ) ,
619619 )
@@ -663,7 +663,7 @@ describe('conditional skipping of asyncThunks', () => {
663663 } )
664664 await asyncThunk ( arg ) ( dispatch , getState , extra )
665665
666- expect ( dispatch ) . toHaveBeenCalledTimes ( 1 )
666+ expect ( dispatch ) . toHaveBeenCalledOnce ( )
667667 expect ( dispatch ) . toHaveBeenLastCalledWith (
668668 expect . objectContaining ( {
669669 error : {
@@ -871,9 +871,9 @@ test('`condition` will see state changes from a synchronously invoked asyncThunk
871871 } )
872872
873873 store . dispatch ( asyncThunk ( { force : false } ) )
874- expect ( onStart ) . toHaveBeenCalledTimes ( 1 )
874+ expect ( onStart ) . toHaveBeenCalledOnce ( )
875875 store . dispatch ( asyncThunk ( { force : false } ) )
876- expect ( onStart ) . toHaveBeenCalledTimes ( 1 )
876+ expect ( onStart ) . toHaveBeenCalledOnce ( )
877877 store . dispatch ( asyncThunk ( { force : true } ) )
878878 expect ( onStart ) . toHaveBeenCalledTimes ( 2 )
879879} )
0 commit comments