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

@ -57,11 +57,10 @@ module.exports = function (app) {
res.type('txt').send(data.toString()); res.type('txt').send(data.toString());
}); });
}); });
let error;
app.get('/_api/get-tests', cors(), function(req, res, next){ app.get('/_api/get-tests', cors(), function(req, res, next){
console.log(error); console.log('requested');
if(!error && process.env.NODE_ENV === 'test') return next(); if(process.env.NODE_ENV === 'test') return next();
res.json({status: 'unavailable'}); res.json({status: 'unavailable'});
}, },
function(req, res, next){ function(req, res, next){

View File

@ -49,9 +49,8 @@ app.listen(port, function () {
try { try {
runner.run(); runner.run();
} catch(e) { } catch(e) {
let error = e;
console.log('Tests are not valid:'); console.log('Tests are not valid:');
console.log(error); console.error(e);
} }
}, 1500); }, 1500);
} }