From f6afa488d1289b4303ef1caa29b06f3731c80d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Vest=C3=B8l?= Date: Mon, 4 Feb 2019 13:19:06 +0100 Subject: [PATCH] Partially fixed broken web API test, removed old endpoint --- master.js | 2 +- master.spec.js | 11 ----------- routes.js | 3 --- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/master.js b/master.js index 17b73b6f..319a3fd1 100644 --- a/master.js +++ b/master.js @@ -755,6 +755,7 @@ if(args.masterPort || config.masterPort){ server.listen(args.masterPort || config.masterPort || 8080, function () { console.log("Listening on port %s...", server.address().port); }); + module.exports = server; } /* Websockets for remoteMap */ @@ -985,5 +986,4 @@ async function getPlugins(){ return plugins; } -module.exports = app; })(); diff --git a/master.spec.js b/master.spec.js index 56d8ccc5..a38558bd 100644 --- a/master.spec.js +++ b/master.spec.js @@ -76,17 +76,6 @@ describe('Master server endpoint testing', function() { }); }); }); - it("sends some HTML when accessing /remoteMap",function(done){ - this.timeout(6000); - request(app).get("/remoteMap").end(function(err,res){ - assert.equal(res.statusCode, 200); - validateHTML(res.text).then(result => { - // there should be 1 error regarding complaining about me using ES6 modules before they are fully supported - assert(result.messages.length === 2, "there are HTML errors on the page, please fix: "+JSON.stringify(result.messages)); - done(); - }); - }); - }); }); let persistentMaster = request(app); describe("#POST /api/place", function(){ diff --git a/routes.js b/routes.js index 14f7a473..efd330b0 100644 --- a/routes.js +++ b/routes.js @@ -11,7 +11,4 @@ module.exports = function(app) { app.get("/nodeDetails", function(req, res) { res.render("nodeDetails"); }); - app.get("/remoteMap", function(req, res) { - res.render("remoteMap"); - }); }; \ No newline at end of file