more tests, simplified the standard tests for the loggers

This commit is contained in:
Spencer Alger
2013-12-04 12:49:39 -07:00
parent 4e5f08a29c
commit c070c9e741
30 changed files with 535 additions and 505 deletions

View File

@ -0,0 +1,29 @@
var Log = require('../../src/lib/log');
var FileLogger = require('../../src/lib/loggers/file');
var sinon = require('sinon');
var parentLog;
beforeEach(function () {
parentLog = new Log();
});
afterEach(function () {
parentLog.close();
});
function makeLogger(parent, levels, path) {
parent = parent || parentLog;
var config = {
levels: Log.parseLevels(levels || 'trace'),
path: path === void 0 ? 'elasticsearch.log' : path
};
return new FileLogger(parent, config);
}
var stub = require('./auto_release_stub').make();
describe('File Logger', function () {
require('./generic_logger_tests')(makeLogger);
});