summaryrefslogtreecommitdiffstats
path: root/spec/parser.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-04-13 21:18:53 -0500
committerkpdecker <kpdecker@gmail.com>2015-04-13 21:18:53 -0500
commitdfd141cd3566c52c271c7470ff690fa6ace6f548 (patch)
tree0729215dc4afd922dc8b7b9e672f6a2a194f0c21 /spec/parser.js
parent37a664bf6438bde0ee827a68da4cbd95a21cf52e (diff)
downloadhandlebars.js-dfd141cd3566c52c271c7470ff690fa6ace6f548.zip
handlebars.js-dfd141cd3566c52c271c7470ff690fa6ace6f548.tar.gz
handlebars.js-dfd141cd3566c52c271c7470ff690fa6ace6f548.tar.bz2
Allow undefined and null in helper names
Diffstat (limited to 'spec/parser.js')
-rw-r--r--spec/parser.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/parser.js b/spec/parser.js
index 6f5a660..d799e08 100644
--- a/spec/parser.js
+++ b/spec/parser.js
@@ -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");
});