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

Revert "Update Webpack + deps, remove now unnecessary polyfills" (#2479)

* Revert "Update Webpack + deps, remove now unnecessary polyfills (#2410)"

This reverts commit 189b34c45a.

* Fix build (#2496)

* Change syntax to see if build passes

* Test commit

* Test with node 10

* Test adding all browsers in travis

* remove other browsers when running on travis
This commit is contained in:
Felipe Martins
2019-10-25 11:34:47 -03:00
committed by GitHub
parent 494d817314
commit 097948698a
13 changed files with 113 additions and 47 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
An alert should be shown with the <code>{"name":"axios"}</code>
<script src="promise.js"></script>
<script src="../../dist/axios.js"></script>
<script>
axios.get('./fixture.json').then(function(response) {
@@ -17,4 +18,4 @@ An alert should be shown with the <code>{"name":"axios"}</code>
</script>
</body>
</html>
</html>
+2 -1
View File
@@ -7,6 +7,7 @@
An alert should be shown with <code>{"status":"ok"}</code>
<script src="promise.js"></script>
<script src="../../dist/axios.js"></script>
<script>
axios.get('http://cors-test.appspot.com/test').then(function(response) {
@@ -16,4 +17,4 @@ An alert should be shown with <code>{"status":"ok"}</code>
</script>
</body>
</html>
</html>
File diff suppressed because one or more lines are too long
+3
View File
@@ -1,3 +1,6 @@
// Polyfill ES6 Promise
require('es6-promise').polyfill();
// Polyfill URLSearchParams
URLSearchParams = require('url-search-params');
+5
View File
@@ -2,6 +2,11 @@ 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);
+12
View File
@@ -0,0 +1,12 @@
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');
});
});