summaryrefslogtreecommitdiffstats
path: root/spec/compiler.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-12-24 09:43:36 -0600
committerkpdecker <kpdecker@gmail.com>2015-12-26 18:49:28 -0600
commit118836f390ffa882c720426db94e6b6748e69242 (patch)
treec0767406262ceef65b3c7fd2bd0a1b9b6c1b8bf4 /spec/compiler.js
parentee6fadffb47a129f27e74ad7fcb6c0735d7cc274 (diff)
downloadhandlebars.js-118836f390ffa882c720426db94e6b6748e69242.zip
handlebars.js-118836f390ffa882c720426db94e6b6748e69242.tar.gz
handlebars.js-118836f390ffa882c720426db94e6b6748e69242.tar.bz2
Throw exception if id tracking args are passed
Fixes #1151
Diffstat (limited to 'spec/compiler.js')
-rw-r--r--spec/compiler.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/compiler.js b/spec/compiler.js
index be1fb00..9ae7099 100644
--- a/spec/compiler.js
+++ b/spec/compiler.js
@@ -48,16 +48,25 @@ describe('compiler', function() {
it('can pass through an empty string', function() {
equal(Handlebars.compile('')(), '');
});
+
+ it('throws on desupported options', function() {
+ shouldThrow(function() {
+ Handlebars.compile('Dudes', {trackIds: true});
+ }, Error, 'TrackIds and stringParams are no longer supported. See Github #1145');
+ shouldThrow(function() {
+ Handlebars.compile('Dudes', {stringParams: true});
+ }, Error, 'TrackIds and stringParams are no longer supported. See Github #1145');
+ });
});
describe('#precompile', function() {
it('should fail with invalid input', function() {
shouldThrow(function() {
Handlebars.precompile(null);
- }, Error, 'You must pass a string or Handlebars AST to Handlebars.precompile. You passed null');
+ }, Error, 'You must pass a string or Handlebars AST to Handlebars.compile. You passed null');
shouldThrow(function() {
Handlebars.precompile({});
- }, Error, 'You must pass a string or Handlebars AST to Handlebars.precompile. You passed [object Object]');
+ }, Error, 'You must pass a string or Handlebars AST to Handlebars.compile. You passed [object Object]');
});
it('can utilize AST instance', function() {