summaryrefslogtreecommitdiff
path: root/js/test/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/test/main.js')
-rw-r--r--js/test/main.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/test/main.js b/js/test/main.js
index 0a8505f..edebe86 100644
--- a/js/test/main.js
+++ b/js/test/main.js
@@ -46,13 +46,17 @@ ava.test.beforeEach(t => {
global.XMLHttpRequest = t.context.xhr;};
function minor_mocks() {
var document = {};
+ document.createElement = ()=>
+ {return {innerHTML: "",
+ setAttribute: function(a, b){}}};
document.addEventListener = ()=>{};
document.getElementsByClassName = ()=>
{return [{style: {visibility: "hidden"}}]};
document.getElementById = ()=>
/* pacifies code that attempts
* to change this property anyway. */
- {return {style: {visibility: "hidden"}}};
+ {return {style: {visibility: "hidden"},
+ appendChild: function(a){}}};
global.document = document;
global.alert = console.log;
// disable logging for tests