Skip to content

Commit

Permalink
Add test for escaped percent, escaped string, and meta combination
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed Mar 23, 2016
1 parent 51a5512 commit 9a3d66c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/logger-test.js
Expand Up @@ -358,6 +358,16 @@ vows.describe('winton/logger').addBatch({
assert.deepEqual(meta, {number: 123});
},
},
"when passed an escaped percent sign, a format token, and a meta": {
topic: function (logger) {
logger.once('logging', this.callback);
logger.log('info', 'test message %% %s', 'foo', {number: 123});
},
"should interpolate with meta": function (transport, level, msg, meta) {
assert.strictEqual(msg, 'test message % foo');
assert.deepEqual(meta, {number: 123});
},
},
"when passed interpolation strings and a meta object": {
topic: function (logger) {
logger.once('logging', this.callback);
Expand Down

0 comments on commit 9a3d66c

Please sign in to comment.