From 07e920cc1b67f9eb5020566ce2379bad0c48bdb5 Mon Sep 17 00:00:00 2001 From: Danny Brain Date: Thu, 27 Oct 2011 16:43:55 +1100 Subject: [PATCH] Quick check to make sure the actualAppender gets the right configuration --- test/hookioAppender.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/hookioAppender.js b/test/hookioAppender.js index 87afdc0..32c3d66 100644 --- a/test/hookioAppender.js +++ b/test/hookioAppender.js @@ -10,6 +10,7 @@ function fancyResultingHookioAppender(opts) { }; fakeLog4Js.loadAppender = function (appender) { fakeLog4Js.appenderMakers[appender] = function (config) { + result.actualLoggerConfig = config; return function log(logEvent) { result.logged.push(logEvent); } @@ -71,6 +72,10 @@ vows.describe('log4js hookioAppender').addBatch({ assert.equal(result.logged[1].level.toString(), 'DEBUG'); assert.equal(result.logged[1].data, 'OH WOW'); assert.isTrue(typeof(result.logged[1].startTime) === 'object'); + }, + + 'the actual logger should get the right config': function (result) { + assert.equal(result.actualLoggerConfig.type, 'file'); } }, 'worker': {