jshint fixes
This commit is contained in:
parent
373dca0733
commit
6874ef823a
@ -77,7 +77,7 @@ suite('health checks', function() {
|
||||
test('error if disabled file exists', function(done) {
|
||||
var fs = require('fs');
|
||||
|
||||
readFileFn = fs.readFile
|
||||
var readFileFn = fs.readFile;
|
||||
fs.readFile = function(filename, callback) {
|
||||
callback(null, "Maintenance");
|
||||
}
|
||||
@ -85,22 +85,22 @@ suite('health checks', function() {
|
||||
assert.equal(err.message, "Maintenance");
|
||||
assert.equal(err.http_status, 503);
|
||||
done();
|
||||
fs.readFile = readFileFn;
|
||||
});
|
||||
fs.readFile = readFileFn;
|
||||
});
|
||||
|
||||
test('not err if disabled file does not exists', function(done) {
|
||||
var fs = require('fs');
|
||||
|
||||
readFileFn = fs.readFile
|
||||
|
||||
var readFileFn = fs.readFile;
|
||||
fs.readFile = function(filename, callback) {
|
||||
throw "ENOENT"
|
||||
callback(new Error("ENOENT"), null);
|
||||
}
|
||||
healthCheck.check('fake', 'select 1', function(err, result) {
|
||||
assert.equal(err, null);
|
||||
done();
|
||||
fs.readFile = readFileFn;
|
||||
});
|
||||
fs.readFile = readFileFn;
|
||||
});
|
||||
|
||||
function mockGetAllUserDBParams(func) {
|
||||
|
Loading…
Reference in New Issue
Block a user