Allow undefined and null in helper names

This commit is contained in:
kpdecker
2015-04-13 21:18:53 -05:00
parent 37a664bf64
commit dfd141cd35
4 changed files with 21 additions and 3 deletions
+4
View File
@@ -58,6 +58,10 @@ describe('parser', function() {
equals(ast_for("{{foo false}}"), "{{ PATH:foo [BOOLEAN{false}] }}\n");
});
it('parses mustaches with undefined and null paths', function() {
equals(ast_for("{{undefined}}"), "{{ UNDEFINED [] }}\n");
equals(ast_for("{{null}}"), "{{ NULL [] }}\n");
});
it('parses mustaches with undefined and null parameters', function() {
equals(ast_for("{{foo undefined null}}"), "{{ PATH:foo [UNDEFINED, NULL] }}\n");
});