diff --git a/test/fileAppender.js b/test/fileAppender.js index 10cb887..92d69eb 100644 --- a/test/fileAppender.js +++ b/test/fileAppender.js @@ -63,7 +63,7 @@ vows.describe('log4js fileAppender').addBatch({ 'starting with the test file name should be two': function(err, files) { //there will always be one backup if you've specified a max log size var logFiles = files.filter(function(file) { return file.indexOf('fa-maxFileSize-test.log') > -1; }); - assert.length(logFiles, 2); + assert.equal(logFiles.length, 2); } } }, @@ -97,7 +97,7 @@ vows.describe('log4js fileAppender').addBatch({ return logFiles; }, 'should be 3': function (files) { - assert.length(files, 3); + assert.equal(files.length, 3); }, 'should be named in sequence': function (files) { assert.deepEqual(files, ['fa-maxFileSize-with-backups-test.log', 'fa-maxFileSize-with-backups-test.log.1', 'fa-maxFileSize-with-backups-test.log.2']); diff --git a/test/layouts.js b/test/layouts.js index 5826fa3..5930276 100644 --- a/test/layouts.js +++ b/test/layouts.js @@ -106,7 +106,7 @@ vows.describe('log4js layouts').addBatch({ output = layout(event); lines = output.split(/\n/); - assert.length(lines, stack.length); + assert.equal(lines.length, stack.length); assert.equal(lines[0], "[2010-12-05 14:18:30.045] [DEBUG] tests - this is a test Error: Some made-up error"); for (var i = 1; i < stack.length; i++) { assert.equal(lines[i+1], stack[i+1]); diff --git a/test/logLevelFilter.js b/test/logLevelFilter.js index 6cef459..4fd5f4f 100644 --- a/test/logLevelFilter.js +++ b/test/logLevelFilter.js @@ -24,7 +24,7 @@ vows.describe('log4js logLevelFilter').addBatch({ return logEvents; }, 'should only pass log events greater than or equal to its own level' : function(logEvents) { - assert.length(logEvents, 2); + assert.equal(logEvents.length, 2); assert.equal(logEvents[0].data[0], 'this should, though'); assert.equal(logEvents[1].data[0], 'so should this'); } diff --git a/test/logging.js b/test/logging.js index 94c699b..77e4415 100644 --- a/test/logging.js +++ b/test/logging.js @@ -42,7 +42,7 @@ vows.describe('log4js').addBatch({ }, 'should not emit events of a lower level': function(events) { - assert.length(events, 4); + assert.equal(events.length, 4); assert.equal(events[1].level.toString(), 'WARN'); }, @@ -456,7 +456,7 @@ vows.describe('log4js').addBatch({ }, 'should configure log4js from first log4js.json found': function(args) { var logEvents = args[1]; - assert.length(logEvents, 3); + assert.equal(logEvents.length, 3); assert.equal(logEvents[0].data[0], 'info1'); assert.equal(logEvents[1].data[0], 'info3'); assert.equal(logEvents[2].data[0], 'debug4'); @@ -536,7 +536,7 @@ vows.describe('log4js').addBatch({ }, 'should configure log4js from first log4js.json found': function(args) { var logEvents = args[1]; - assert.length(logEvents, 2); + assert.equal(logEvents.length, 2); assert.equal(logEvents[0].data[0], 'info1'); assert.equal(logEvents[1].data[0], 'info3'); } diff --git a/test/test-connect-logger.js b/test/test-connect-logger.js index f89a9f8..15f3a78 100644 --- a/test/test-connect-logger.js +++ b/test/test-connect-logger.js @@ -76,7 +76,7 @@ vows.describe('log4js connect logger').addBatch({ 'check message': function(messages) { assert.isArray(messages); - assert.length(messages, 1); + assert.equal(messages.length, 1); assert.equal(messages[0].level, levels.INFO); assert.include(messages[0].message, 'GET'); assert.include(messages[0].message, 'http://url'); @@ -117,7 +117,7 @@ vows.describe('log4js connect logger').addBatch({ 'check message': function(messages) { assert.isArray(messages); - assert.length(messages, 1); + assert.equal(messages.length, 1); assert.equal(messages[0].level, levels.INFO); assert.equal(messages[0].message, 'GET http://url'); }