From de72005e7eb03e1e229788d7f0fb44a1bb7cb281 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Tue, 14 Aug 2012 09:44:43 +1000 Subject: [PATCH] Fixed layout stack trace test --- test/layouts-test.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/layouts-test.js b/test/layouts-test.js index 660b8c9..115e976 100644 --- a/test/layouts-test.js +++ b/test/layouts-test.js @@ -77,7 +77,7 @@ vows.describe('log4js layouts').addBatch({ } }), "{ thing: 1 }"); }, - 'should print the stacks of a passed error objects': function(layout) { + 'should print the stacks of a passed error objects': function(layout) { assert.isArray(layout({ data: [ new Error() ] , startTime: new Date(2010, 11, 5, 14, 18, 30, 45) @@ -86,12 +86,12 @@ vows.describe('log4js layouts').addBatch({ colour: "green" , toString: function() { return "ERROR"; } } - }).match(/Error\s+at Object\.\s+\((.*)test[\\\/]layouts-test\.js\:\d+\:\d+\)\s+at runTest/) + }).match(/Error\s+at Object\..*\s+\((.*)test[\\\/]layouts-test\.js\:\d+\:\d+\)\s+at runTest/) , 'regexp did not return a match'); }, - 'with passed augmented errors': + 'with passed augmented errors': { topic: - function(layout){ + function(layout){ var e = new Error("My Unique Error Message"); e.augmented = "My Unique attribute value" e.augObj = { at1: "at2" } @@ -105,15 +105,15 @@ vows.describe('log4js layouts').addBatch({ } }); }, - 'should print error the contained error message': function(layoutOutput) { + 'should print error the contained error message': function(layoutOutput) { var m = layoutOutput.match(/\{ \[Error: My Unique Error Message\]/); assert.isArray(m); }, - 'should print error augmented string attributes': function(layoutOutput) { + 'should print error augmented string attributes': function(layoutOutput) { var m = layoutOutput.match(/augmented:\s'My Unique attribute value'/); assert.isArray(m); }, - 'should print error augmented object attributes': function(layoutOutput) { + 'should print error augmented object attributes': function(layoutOutput) { var m = layoutOutput.match(/augObj:\s\{ at1: 'at2' \}/); assert.isArray(m); }