diff options
author | Ryan Lewis <ryanharrisonlewis@gmail.com> | 2015-12-13 20:42:13 -0800 |
---|---|---|
committer | Ryan Lewis <ryanharrisonlewis@gmail.com> | 2015-12-13 20:42:13 -0800 |
commit | 21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c (patch) | |
tree | a120f52441e2f62ecb61696a4f67fdc1c15273b4 /spec/subexpressions.js | |
parent | cc0b239aafefdef0342334b90f3c9b3ac6b19cea (diff) | |
parent | a6121cae797161f74bdd5a25e0c56379992557d7 (diff) | |
download | handlebars.js-21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c.zip handlebars.js-21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c.tar.gz handlebars.js-21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c.tar.bz2 |
Merge branch 'master' of https://github.com/ryanmurakami/handlebars.js
Diffstat (limited to 'spec/subexpressions.js')
-rw-r--r-- | spec/subexpressions.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/spec/subexpressions.js b/spec/subexpressions.js index dad741e..3810eb8 100644 --- a/spec/subexpressions.js +++ b/spec/subexpressions.js @@ -162,50 +162,6 @@ describe('subexpressions', function() { shouldCompileTo(string, [context, helpers], '<input aria-label="Name" placeholder="Example User" />'); }); - it('in string params mode,', function() { - var template = CompilerContext.compile('{{snog (blorg foo x=y) yeah a=b}}', {stringParams: true}); - - var helpers = { - snog: function(a, b, options) { - equals(a, 'foo'); - equals(options.types.length, 2, 'string params for outer helper processed correctly'); - equals(options.types[0], 'SubExpression', 'string params for outer helper processed correctly'); - equals(options.types[1], 'PathExpression', 'string params for outer helper processed correctly'); - return a + b; - }, - - blorg: function(a, options) { - equals(options.types.length, 1, 'string params for inner helper processed correctly'); - equals(options.types[0], 'PathExpression', 'string params for inner helper processed correctly'); - return a; - } - }; - - var result = template({ - foo: {}, - yeah: {} - }, {helpers: helpers}); - - equals(result, 'fooyeah'); - }); - - it('as hashes in string params mode', function() { - var template = CompilerContext.compile('{{blog fun=(bork)}}', {stringParams: true}); - - var helpers = { - blog: function(options) { - equals(options.hashTypes.fun, 'SubExpression'); - return 'val is ' + options.hash.fun; - }, - bork: function() { - return 'BORK'; - } - }; - - var result = template({}, {helpers: helpers}); - equals(result, 'val is BORK'); - }); - it('subexpression functions on the context', function() { var string = '{{foo (bar)}}!'; var context = { |