mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Moving test helpers and auto-loading them
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
var axios = require('../../index');
|
||||
var getAjaxRequest = require('./__getAjaxRequest');
|
||||
|
||||
describe('requests', function () {
|
||||
beforeEach(function () {
|
||||
jasmine.Ajax.install();
|
||||
@@ -154,6 +151,12 @@ describe('requests', function () {
|
||||
});
|
||||
|
||||
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);
|
||||
input[0] = 1;
|
||||
input[1] = 2;
|
||||
@@ -170,6 +173,12 @@ describe('requests', function () {
|
||||
});
|
||||
|
||||
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);
|
||||
input[0] = 1;
|
||||
input[1] = 2;
|
||||
@@ -186,6 +195,12 @@ describe('requests', function () {
|
||||
});
|
||||
|
||||
it('should support array buffer response', function (done) {
|
||||
// ArrayBuffer doesn't exist in IE8/9
|
||||
if (isOldIE && typeof ArrayBuffer === 'undefined') {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
var response;
|
||||
|
||||
function str2ab(str) {
|
||||
|
||||
Reference in New Issue
Block a user