mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Remove usages of isOldIE in tests
This commit is contained in:
committed by
Khaled Garbaya
parent
7b6f541e9d
commit
33747ee8fb
@@ -264,12 +264,6 @@ describe('requests', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should support binary data as array buffer', function (done) {
|
it('should support binary data as array buffer', function (done) {
|
||||||
// Int8Array doesn't exist in IE8/9
|
|
||||||
if (isOldIE && typeof Int8Array === 'undefined') {
|
|
||||||
done();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var input = new Int8Array(2);
|
var input = new Int8Array(2);
|
||||||
input[0] = 1;
|
input[0] = 1;
|
||||||
input[1] = 2;
|
input[1] = 2;
|
||||||
@@ -286,12 +280,6 @@ describe('requests', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should support binary data as array buffer view', function (done) {
|
it('should support binary data as array buffer view', function (done) {
|
||||||
// Int8Array doesn't exist in IE8/9
|
|
||||||
if (isOldIE && typeof Int8Array === 'undefined') {
|
|
||||||
done();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var input = new Int8Array(2);
|
var input = new Int8Array(2);
|
||||||
input[0] = 1;
|
input[0] = 1;
|
||||||
input[1] = 2;
|
input[1] = 2;
|
||||||
@@ -308,12 +296,6 @@ describe('requests', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should support array buffer response', function (done) {
|
it('should support array buffer response', function (done) {
|
||||||
// ArrayBuffer doesn't exist in IE8/9
|
|
||||||
if (isOldIE && typeof ArrayBuffer === 'undefined') {
|
|
||||||
done();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var response;
|
var response;
|
||||||
|
|
||||||
function str2ab(str) {
|
function str2ab(str) {
|
||||||
|
|||||||
@@ -8,39 +8,19 @@ describe('utils::isX', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should validate ArrayBuffer', function () {
|
it('should validate ArrayBuffer', function () {
|
||||||
// ArrayBuffer doesn't exist in IE8/9
|
|
||||||
if (isOldIE && typeof ArrayBuffer === 'undefined') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(utils.isArrayBuffer(new ArrayBuffer(2))).toEqual(true);
|
expect(utils.isArrayBuffer(new ArrayBuffer(2))).toEqual(true);
|
||||||
expect(utils.isArrayBuffer({})).toEqual(false);
|
expect(utils.isArrayBuffer({})).toEqual(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should validate ArrayBufferView', function () {
|
it('should validate ArrayBufferView', function () {
|
||||||
// ArrayBuffer doesn't exist in IE8/9
|
|
||||||
if (isOldIE && typeof ArrayBuffer === 'undefined') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(utils.isArrayBufferView(new DataView(new ArrayBuffer(2)))).toEqual(true);
|
expect(utils.isArrayBufferView(new DataView(new ArrayBuffer(2)))).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should validate FormData', function () {
|
it('should validate FormData', function () {
|
||||||
// FormData doesn't exist in IE8/9
|
|
||||||
if (isOldIE && typeof FormData === 'undefined') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(utils.isFormData(new FormData())).toEqual(true);
|
expect(utils.isFormData(new FormData())).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should validate Blob', function () {
|
it('should validate Blob', function () {
|
||||||
// Blob doesn't exist in IE8/9
|
|
||||||
if (isOldIE && typeof Blob === 'undefined') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(utils.isBlob(new Blob())).toEqual(true);
|
expect(utils.isBlob(new Blob())).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user