From e638ff727102740cd641062c9955ee2243e59dac Mon Sep 17 00:00:00 2001 From: Vladimir Mitev Date: Tue, 20 May 2014 14:42:29 +0300 Subject: [PATCH] Unit test. Fixed the old unit tests. Added validation for new functionality. Signed-off-by: Vladimir Mitev --- test/clusteredAppender-test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/clusteredAppender-test.js b/test/clusteredAppender-test.js index 91e0a0f..f36748c 100755 --- a/test/clusteredAppender-test.js +++ b/test/clusteredAppender-test.js @@ -37,7 +37,8 @@ vows.describe('log4js cluster appender').addBatch({ }); var masterAppender = appenderModule.appender({ - actualAppenders: [ fakeActualAppender ] + actualAppenders: [fakeActualAppender, fakeActualAppender, fakeActualAppender], + appenders: [{}, {category: "test"}, {category: "wovs"}] }); // Actual test - log message using masterAppender @@ -56,7 +57,9 @@ vows.describe('log4js cluster appender').addBatch({ }, "should log using actual appender": function(topic) { + assert.equal(topic.loggingEvents.length, 2) assert.equal(topic.loggingEvents[0].data[0], 'masterAppender test'); + assert.equal(topic.loggingEvents[1].data[0], 'masterAppender test'); }, },