mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Refactored AxiosError to a constructor;
Refactored `Cancel` to a constructor, a subclass of the `AxiosError`; Expose CanceledError class; Refactored axios error codes; Added `toFlatObject` util;
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
var AxiosError = require("../../lib/core/AxiosError");
|
||||
|
||||
describe('transform', function () {
|
||||
beforeEach(function () {
|
||||
jasmine.Ajax.install();
|
||||
@@ -64,6 +66,7 @@ describe('transform', function () {
|
||||
setTimeout(function () {
|
||||
expect(thrown).toBeTruthy();
|
||||
expect(thrown.name).toContain('SyntaxError');
|
||||
expect(thrown.code).toEqual(AxiosError.ERR_BAD_RESPONSE);
|
||||
done();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user