mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Update Webpack + deps, remove now unnecessary polyfills (#2410)
* Update deps * handles webpack 1 -> 4 migration * remove promise helpers from dev files assume `Promise` is available, or polyfilled by the consumer * Remove isArray util. `isArray` has good coverage, even in IE9. So lets remove the custom polyfill. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray also resolves a few lint issues * Remove trim util String.protoype.trim has good coverage (including IE9) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim Also, the http adapter already uses the native method.
This commit is contained in:
committed by
Felipe Martins
parent
29da6b24db
commit
189b34c45a
@@ -2,11 +2,6 @@ var utils = require('../../../lib/utils');
|
||||
var Stream = require('stream');
|
||||
|
||||
describe('utils::isX', function () {
|
||||
it('should validate Array', function () {
|
||||
expect(utils.isArray([])).toEqual(true);
|
||||
expect(utils.isArray({length: 5})).toEqual(false);
|
||||
});
|
||||
|
||||
it('should validate ArrayBuffer', function () {
|
||||
expect(utils.isArrayBuffer(new ArrayBuffer(2))).toEqual(true);
|
||||
expect(utils.isArrayBuffer({})).toEqual(false);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
var trim = require('../../../lib/utils').trim;
|
||||
|
||||
describe('utils::trim', function () {
|
||||
it('should trim spaces', function () {
|
||||
expect(trim(' foo ')).toEqual('foo');
|
||||
});
|
||||
|
||||
it('should trim tabs', function () {
|
||||
expect(trim('\tfoo\t')).toEqual('foo');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user