2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

fix(core): add the missed implementation of AxiosError#status property; (#6573)

This commit is contained in:
Dmitriy Mozgovoy
2024-08-23 15:58:38 +03:00
committed by GitHub
parent 7004707c41
commit 6700a8adac
2 changed files with 10 additions and 2 deletions
+5
View File
@@ -48,4 +48,9 @@ describe('core::AxiosError', function() {
expect(AxiosError.from(error, 'ESOMETHING', { foo: 'bar' }) instanceof AxiosError).toBeTruthy();
});
});
it('should have status property when response was passed to the constructor', () => {
const err = new AxiosError('test', 'foo', {}, {}, {status: 400});
expect(err.status).toBe(400);
});
});