2
0
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:
Matt Zabriskie
2016-03-07 13:21:27 -07:00
parent 0da38da921
commit dcbb352262
19 changed files with 141 additions and 124 deletions
+18 -3
View File
@@ -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) {