summaryrefslogtreecommitdiffstats
path: root/spec/javascript-compiler.js
diff options
context:
space:
mode:
authorKevin Decker <kpdecker@gmail.com>2015-01-17 18:32:58 -0600
committerKevin Decker <kpdecker@gmail.com>2015-01-17 18:32:58 -0600
commitb7488acf89295f0db92f740ce268708b0408cf87 (patch)
treecf7475035226adc8aa80db9b392550355a5cd4ab /spec/javascript-compiler.js
parentc5fe2527b393a1cc83948bdfd86b8b3783332eef (diff)
parentc9d723e0fb18001273a076c6413c1f847812e508 (diff)
downloadhandlebars.js-b7488acf89295f0db92f740ce268708b0408cf87.zip
handlebars.js-b7488acf89295f0db92f740ce268708b0408cf87.tar.gz
handlebars.js-b7488acf89295f0db92f740ce268708b0408cf87.tar.bz2
Merge pull request #940 from mattflaschen/addMissingReservedWords
Add missing reserved words so compiler knows to use array syntax:
Diffstat (limited to 'spec/javascript-compiler.js')
-rw-r--r--spec/javascript-compiler.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/javascript-compiler.js b/spec/javascript-compiler.js
index 4260567..fb78658 100644
--- a/spec/javascript-compiler.js
+++ b/spec/javascript-compiler.js
@@ -19,6 +19,12 @@ describe('javascript-compiler api', function() {
};
shouldCompileTo("{{foo}}", { bar_foo: "food" }, "food");
});
+
+ // Tests nameLookup dot vs. bracket behavior. Bracket is required in certain cases
+ // to avoid errors in older browsers.
+ it('should handle reserved words', function() {
+ shouldCompileTo("{{foo}} {{~null~}}", { foo: "food" }, "food");
+ });
});
describe('#compilerInfo', function() {
var $superCheck, $superInfo;