@@ -55,7 +55,7 @@ test('should transition between states', t => {
5555let prevState = undefined
5656const store = createStore ( fetchUsersReducer , state )
5757
58- const expect = ( expected , maybeMessage ) => t . deepEquals ( state , expected , maybeMessage )
58+ const expectState = ( expected , maybeMessage ) => t . deepEquals ( state , expected , maybeMessage )
5959
6060const action = ( type , payload ) => {
6161prevState = state
@@ -64,36 +64,36 @@ test('should transition between states', t => {
6464}
6565
6666action ( 'DUMMY' )
67- expect ( {
67+ expectState ( {
6868status :'INIT' ,
6969} , 'Should set initial status to "INIT"' )
7070
7171action ( 'FETCH_USERS_RESPONSE' , { users} )
72- expect ( prevState , 'Should ignore messages when not handled by current status' )
72+ expectState ( prevState , 'Should ignore messages when not handled by current status' )
7373
7474action ( 'FETCH_USERS' )
75- expect ( {
75+ expectState ( {
7676error :null ,
7777status :'IN_PROGRESS'
7878} )
7979
8080action ( 'FETCH_USERS_FAIL' , 'timeout' )
81- expect ( {
81+ expectState ( {
8282error :'timeout' ,
8383status :'INIT'
8484} )
8585
8686action ( 'FETCH_USERS' )
87- expect ( {
87+ expectState ( {
8888error :null ,
8989status :'IN_PROGRESS'
9090} )
9191
9292action ( 'FETCH_USERS' )
93- expect ( prevState )
93+ expectState ( prevState )
9494
9595action ( 'FETCH_USERS_RESPONSE' , { users} )
96- expect ( {
96+ expectState ( {
9797error :null ,
9898status :'INIT' ,
9999 users