Skip to content

Commit dd0bf13

Browse files
author
Danil Agafonov
committed
update dependency & fix tests
1 parent 9b87c63 commit dd0bf13

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
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",

test/defaults.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff 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(() => {

test/middleware.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)