mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-04-24 00:00:03 +08:00
feature #239: add enumeration style object for error codes
This commit is contained in:
@@ -147,6 +147,10 @@ describe('Advanced HTTP public interface', function () {
|
||||
it('throws an Error when you try to configure global option for following redirects with a string', () => {
|
||||
(function () { http.setFollowRedirect('myString'); }).should.throw(messages.INVALID_FOLLOW_REDIRECT_VALUE);
|
||||
});
|
||||
|
||||
it('exposes an enumeration style object with mappings for the error codes', () => {
|
||||
Object.keys(http.ErrorCode).forEach(key => http.ErrorCode[key].should.be.a('number'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('URL util', function () {
|
||||
|
||||
Reference in New Issue
Block a user