chore: remove unused error (#20)

This commit is contained in:
Shaun Hamilton 2021-08-24 17:19:56 +01:00 committed by GitHub
parent 0a3fc7c3cd
commit 56c68caa93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -58,10 +58,9 @@ module.exports = function (app) {
});
});
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){

View File

@ -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);
}