Skip to content

Commit

Permalink
Fixed layout stack trace test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Jones committed Aug 13, 2012
1 parent c6a0e58 commit de72005
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/layouts-test.js
Expand Up @@ -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)
Expand All @@ -86,12 +86,12 @@ vows.describe('log4js layouts').addBatch({
colour: "green"
, toString: function() { return "ERROR"; }
}
}).match(/Error\s+at Object\.<anonymous>\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" }
Expand All @@ -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);
}
Expand Down

0 comments on commit de72005

Please sign in to comment.