2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Removed import of url module in browser build due to significant size overhead; (#4594)

Removed pointless `Malformed URL` checking in  client build;
This commit is contained in:
Dmitriy Mozgovoy
2022-04-26 10:08:49 +03:00
committed by GitHub
parent cdd7add9b0
commit 4f7e3e3a7a
6 changed files with 849 additions and 717 deletions
+6 -13
View File
@@ -505,7 +505,7 @@ describe('requests', function () {
.then(function (res) {
response = res
})
getAjaxRequest().then(function (request) {
expect(request.method).toBe('GET');
request.respondWith({
@@ -515,19 +515,12 @@ describe('requests', function () {
});
});
it('should return malformed url error message', function (done) {
axios.get('tel:484-695-3408')
.catch(function (error) {
expect(error.message).toEqual('Malformed URL tel:484-695-3408')
done();
})
});
it('should return unsupported protocol error message', function (done) {
axios.get('ftp:google.com')
.catch(function (error) {
it('should return unsupported protocol error message', function () {
return axios.get('ftp:localhost')
.then(function(){
fail('Does not throw');
}, function (error) {
expect(error.message).toEqual('Unsupported protocol ftp:')
done();
})
});
});