File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed
Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 2424 "axios" : " >= 0.5"
2525 },
2626 "devDependencies" : {
27- "axios" : " ^0.11 .1" ,
27+ "axios" : " ^0.13 .1" ,
2828 "axios-mock-adapter" : " ^1.3.1" ,
2929 "babel-cli" : " ^6.5.1" ,
3030 "babel-eslint" : " ^6.0.2" ,
Original file line number Diff line number Diff line change @@ -91,11 +91,13 @@ describe('defaults', () => {
9191 let resultAction = null ;
9292 let next = ( action ) => resultAction = action ;
9393 const error = {
94- data : [ 'Error1' , 'Error2' ] ,
95- status :400 ,
96- statusTest :'BAD_REQUEST' ,
97- headers :{ } ,
98- config : { }
94+ response : {
95+ data : [ 'Error1' , 'Error2' ] ,
96+ status :400 ,
97+ statusTest :'BAD_REQUEST' ,
98+ headers :{ } ,
99+ config : { }
100+ }
99101 } ;
100102
101103 beforeEach ( ( ) => {
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ describe('middleware', () => {
2525 } ) ;
2626
2727 it ( 'should dispatch _SUCCESS' , ( ) => {
28- mockAxiosClient . onGet ( ` ${ BASE_URL } /test` ) . reply ( 200 , 'response' ) ;
28+ mockAxiosClient . onGet ( ' /test' ) . reply ( 200 , 'response' ) ;
2929
3030 const expectActions = [ {
3131 type : 'LOAD' ,
@@ -47,7 +47,7 @@ describe('middleware', () => {
4747 } ) ;
4848 } ) ;
4949 it ( 'should dispatch _FAIL' , ( ) => {
50- mockAxiosClient . onGet ( ` ${ BASE_URL } /test` ) . reply ( 404 ) ;
50+ mockAxiosClient . onGet ( ' /test' ) . reply ( 404 ) ;
5151 const expectActions = [ {
5252 type : 'LOAD' ,
5353 payload : {
@@ -59,7 +59,9 @@ describe('middleware', () => {
5959 } , {
6060 type : 'LOAD_FAIL' ,
6161 error : {
62- status : 404
62+ response : {
63+ status : 404
64+ }
6365 }
6466 } ] ;
6567 const store = mockStore ( ) ;
You can’t perform that action at this time.
0 commit comments