mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Fixed merge conflicts
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
var kindOf = require('../../../lib/utils').kindOf;
|
||||
|
||||
describe('utils::kindOf', function () {
|
||||
it('should return object tag', function () {
|
||||
expect(kindOf({})).toEqual('object');
|
||||
// cached result
|
||||
expect(kindOf({})).toEqual('object');
|
||||
expect(kindOf([])).toEqual('array');
|
||||
});
|
||||
});
|
||||
@@ -77,4 +77,9 @@ describe('utils::isX', function () {
|
||||
expect(utils.isURLSearchParams(new URLSearchParams())).toEqual(true);
|
||||
expect(utils.isURLSearchParams('foo=1&bar=2')).toEqual(false);
|
||||
});
|
||||
|
||||
it('should validate TypedArray instance', function () {
|
||||
expect(utils.isTypedArray(new Uint8Array([1, 2, 3]))).toEqual(true);
|
||||
expect(utils.isTypedArray([1, 2, 3])).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
var kindOfTest = require('../../../lib/utils').kindOfTest;
|
||||
|
||||
describe('utils::endsWith', function () {
|
||||
it('should return true if the string ends with passed substring', function () {
|
||||
var test = kindOfTest('number');
|
||||
|
||||
expect(test(123)).toEqual(true);
|
||||
expect(test('123')).toEqual(false);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
var kindOf = require('../../../lib/utils').kindOf;
|
||||
|
||||
describe('utils::kindOf', function () {
|
||||
it('should return object tag', function () {
|
||||
expect(kindOf({})).toEqual('object');
|
||||
// cached result
|
||||
expect(kindOf({})).toEqual('object');
|
||||
expect(kindOf([])).toEqual('array');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
var toArray = require('../../../lib/utils').toArray;
|
||||
|
||||
describe('utils::kindOf', function () {
|
||||
it('should return object tag', function () {
|
||||
expect(toArray()).toEqual(null);
|
||||
expect(toArray([])).toEqual([]);
|
||||
expect(toArray([1])).toEqual([1]);
|
||||
expect(toArray([1, 2, 3])).toEqual([1, 2, 3]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user