diff options
author | kpdecker <kpdecker@gmail.com> | 2013-04-06 23:23:40 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2013-04-06 23:23:40 -0500 |
commit | f6ff5c648b6e576d8b6f48ea2a6291dcc6a9e5be (patch) | |
tree | 15b89a445b9f97ba232530f25a5c510880b98095 /spec/qunit_spec.js | |
parent | 12d68caa58b21c847c00818a811782a85ecd5266 (diff) | |
download | handlebars.js-f6ff5c648b6e576d8b6f48ea2a6291dcc6a9e5be.zip handlebars.js-f6ff5c648b6e576d8b6f48ea2a6291dcc6a9e5be.tar.gz handlebars.js-f6ff5c648b6e576d8b6f48ea2a6291dcc6a9e5be.tar.bz2 |
Restore knownHelpersOnly throw
Fixes #302
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r-- | spec/qunit_spec.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js index 6c44e4e..fefb8ec 100644 --- a/spec/qunit_spec.js +++ b/spec/qunit_spec.js @@ -709,6 +709,11 @@ test("Functions are bound to the context in knownHelpers only mode", function() var result = template({foo: function() { return this.bar; }, bar: 'bar'}); equal(result, "bar", "'bar' should === '" + result); }); +test("Unknown helper call in knownHelpers only mode should throw", function() { + shouldThrow(function() { + CompilerContext.compile("{{typeof hello}}", {knownHelpersOnly: true}); + }, Error, 'specified knownHelpersOnly'); +}); suite("blockHelperMissing"); |