gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-backoffice] branch master updated: mocking values fo


From: gnunet
Subject: [GNUnet-SVN] [taler-backoffice] branch master updated: mocking values for tests
Date: Tue, 04 Sep 2018 16:20:55 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository backoffice.

The following commit(s) were added to refs/heads/master by this push:
     new 78f28f5  mocking values for tests
78f28f5 is described below

commit 78f28f53eac7ac5c3f1dbd6f94f619f8f216339c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Sep 4 16:20:34 2018 +0200

    mocking values for tests
---
 js/test/main.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]