Skip to content

Commit

Permalink
added test for using formatter with named property
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Oct 13, 2011
1 parent 0f3b70b commit d8ff857
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test.js
Expand Up @@ -334,6 +334,16 @@ exports.testFormattingArgs = function(test) {
test.done();
};

exports.testFormattingArgsWithProperty = function(test) {
var custom = Formatter({
JSON: JSON.stringify
});
test.equal(custom('({:JSON})', [1,2,3]), '([1,2,3])');
test.equal(custom('({property:JSON})', {property: [1,2,3] }), '([1,2,3])');
test.done();
};


exports.testFormattingJoin = function(test) {
test.expect(5);
test.equals(format('{:join(" ")}', ['blue', 'red', 'green', 'yellow']),
Expand Down

0 comments on commit d8ff857

Please sign in to comment.