fixing some lint issues

This commit is contained in:
Gareth Jones
2013-08-29 16:56:40 +10:00
parent 46ad57b4e0
commit 5e144e4004
17 changed files with 181 additions and 123 deletions

View File

@@ -73,14 +73,14 @@ describe('../../lib/streams/BaseRollingFileStream', function() {
});
it('should not want to roll', function() {
stream.shouldRoll().should.be.false;
stream.shouldRoll().should.eql(false);
});
it('should not roll', function() {
var cbCalled = false;
//just calls the callback straight away, no async calls
stream.roll('basetest.log', function() { cbCalled = true; });
cbCalled.should.be.true;
cbCalled.should.eql(true);
});
});
});

View File

@@ -178,14 +178,19 @@ describe('DateRollingFileStream', function() {
var stream;
before(function(done) {
testTime = new Date(2012, 8, 12, 0, 10, 12),
stream = new DateRollingFileStream(
__dirname + '/test-date-rolling-file-stream-pattern',
'.yyyy-MM-dd',
{ alwaysIncludePattern: true },
now
testTime = new Date(2012, 8, 12, 0, 10, 12);
remove(
__dirname + '/test-date-rolling-file-stream-pattern.2012-09-12',
function() {
stream = new DateRollingFileStream(
__dirname + '/test-date-rolling-file-stream-pattern',
'.yyyy-MM-dd',
{ alwaysIncludePattern: true },
now
);
stream.write("First message\n", 'utf8', done);
}
);
stream.write("First message\n", 'utf8', done);
});
after(function(done) {

View File

@@ -14,7 +14,7 @@ if (semver.satisfies(process.version, '>=0.10.0')) {
RollingFileStream = require('../../lib/streams').RollingFileStream;
function remove(filename, cb) {
fs.unlink(filename, function() { cb(); });
fs.unlink(filename, function(err) { cb(); });
}
function create(filename, cb) {