diff --git a/routes/fcctesting.js b/routes/fcctesting.js index 2e6f3e9..9f0d2a2 100644 --- a/routes/fcctesting.js +++ b/routes/fcctesting.js @@ -57,11 +57,10 @@ module.exports = function (app) { res.type('txt').send(data.toString()); }); }); - - let error; + app.get('/_api/get-tests', cors(), function(req, res, next){ - console.log(error); - if(!error && process.env.NODE_ENV === 'test') return next(); + console.log('requested'); + if(process.env.NODE_ENV === 'test') return next(); res.json({status: 'unavailable'}); }, function(req, res, next){ diff --git a/server.js b/server.js index c79fdd8..2707728 100644 --- a/server.js +++ b/server.js @@ -49,9 +49,8 @@ app.listen(port, function () { try { runner.run(); } catch(e) { - let error = e; console.log('Tests are not valid:'); - console.log(error); + console.error(e); } }, 1500); }