summaryrefslogtreecommitdiffstats
path: root/spec/string-params.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-11-26 20:35:33 -0600
committerkpdecker <kpdecker@gmail.com>2014-11-26 20:36:36 -0600
commit5c921cafebee438fa27d417ae701b24323373a30 (patch)
treeb83b875444816351d3e45f13e8ddf3769294cad1 /spec/string-params.js
parent697bbe59cad06bc74a945f7e26fc0af333a01d47 (diff)
downloadhandlebars.js-5c921cafebee438fa27d417ae701b24323373a30.zip
handlebars.js-5c921cafebee438fa27d417ae701b24323373a30.tar.gz
handlebars.js-5c921cafebee438fa27d417ae701b24323373a30.tar.bz2
Replace DataNode and IdNode with PathNode
This is a breaking change for string mode users as there is no longer a distinct type for data parameters. Instead data consumers should look for the @ prefix value.
Diffstat (limited to 'spec/string-params.js')
-rw-r--r--spec/string-params.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/string-params.js b/spec/string-params.js
index 52ea5a8..4704a84 100644
--- a/spec/string-params.js
+++ b/spec/string-params.js
@@ -58,7 +58,7 @@ describe('string params mode', function() {
var helpers = {
tomdale: function(desire, noun, trueBool, falseBool, options) {
equal(options.types[0], 'StringLiteral', "the string type is passed");
- equal(options.types[1], 'ID', "the expression type is passed");
+ equal(options.types[1], 'PathExpression', "the expression type is passed");
equal(options.types[2], 'BooleanLiteral', "the expression type is passed");
equal(desire, "need", "the string form is passed for strings");
equal(noun, "dad.joke", "the string form is passed for expressions");
@@ -78,10 +78,10 @@ describe('string params mode', function() {
var helpers = {
tomdale: function(exclamation, options) {
equal(exclamation, 'he.says');
- equal(options.types[0], 'ID');
+ equal(options.types[0], 'PathExpression');
equal(options.hashTypes.desire, 'StringLiteral');
- equal(options.hashTypes.noun, 'ID');
+ equal(options.hashTypes.noun, 'PathExpression');
equal(options.hashTypes.bool, 'BooleanLiteral');
equal(options.hash.desire, 'need');
equal(options.hash.noun, 'dad.joke');
@@ -102,7 +102,7 @@ describe('string params mode', function() {
var helpers = {
tomdale: function(exclamation, options) {
equal(exclamation, "he.says");
- equal(options.types[0], "ID");
+ equal(options.types[0], 'PathExpression');
equal(options.contexts.length, 1);
equal(options.hashContexts.noun, context);
@@ -165,8 +165,8 @@ describe('string params mode', function() {
var helpers = {
foo: function(bar, options) {
- equal(bar, 'bar');
- equal(options.types[0], 'DATA');
+ equal(bar, '@bar');
+ equal(options.types[0], 'PathExpression');
return 'Foo!';
}
};