From 7d96fa50388e586fa8e690797c72dfa493cca44f Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Thu, 24 May 2018 10:02:13 +0200
Subject: [PATCH] dynamic loading of google maps API is disabled when testing
 in the console

---
 frontend-js/src/test/js/mocha-config.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/frontend-js/src/test/js/mocha-config.js b/frontend-js/src/test/js/mocha-config.js
index 4b4438049a..1caaad7148 100644
--- a/frontend-js/src/test/js/mocha-config.js
+++ b/frontend-js/src/test/js/mocha-config.js
@@ -88,6 +88,16 @@ function mockBootstrap() {
 }
 
 before(function() {
+  require('../../main/js/Functions').loadScript = function () {
+    global.MathJax = {
+      Hub: {
+        Config: function () {
+        }
+      }
+    };
+    return Promise.resolve();
+  };
+  
   Promise.longStackTraces();
 
   mockBootstrap();
-- 
GitLab