Commit 3ee9f5bc authored by Guillaume Royer's avatar Guillaume Royer

test(node): add missing document storage tests

parent 8d28f670
......@@ -63,6 +63,8 @@ EventTarget.prototype.dispatchEvent = function (event) {
}
};
window.EventTarget = window.EventTarget || EventTarget;
function Blob(blobParts, options) {
// https://developer.mozilla.org/en-US/docs/Web/API/Blob
var i,
......@@ -101,7 +103,7 @@ Blob.prototype.slice = function (start, end, contentType) {
});
};
window.Blob = Blob;
window.Blob = window.Blob || Blob;
function FileReader() {
EventTarget.call(this);
......@@ -153,6 +155,8 @@ FileReader.prototype.readAsDataURL = function (blob) {
});
};
window.FileReader = window.FileReader || FileReader;
function atob(str) {
try {
return window.atob(str);
......@@ -169,6 +173,8 @@ function atob(str) {
}
}
window.atob = window.atob || atob;
function btoa(str) {
try {
return window.btoa(str);
......@@ -184,3 +190,5 @@ function btoa(str) {
return buffer.toString('base64');
}
}
window.btoa = window.btoa || btoa;
......@@ -7,5 +7,5 @@ var RSVP = require('rsvp'),
UriTemplate = require('uritemplate'),
process = require('process');
window.FormData = FormData;
window.XMLHttpRequest = XMLHttpRequest;
window.FormData = window.FormData || FormData;
window.XMLHttpRequest = window.XMLHttpRequest || XMLHttpRequest;
......@@ -25,6 +25,7 @@ if (reportData) {
testrunner.run({
code: 'test/node-require.js',
tests: [
'test/jio.storage/documentstorage.tests.js',
'test/jio.storage/dropboxstorage.tests.js',
'test/jio.storage/erp5storage.tests.js',
'test/jio.storage/fbstorage.tests.js',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment