Skip to content

Commit

Permalink
Update test files.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Oct 12, 2015
1 parent d3fd5e3 commit 60670fc
Show file tree
Hide file tree
Showing 32 changed files with 168 additions and 234 deletions.
8 changes: 4 additions & 4 deletions test/expected/amd_compile.js
Expand Up @@ -2,10 +2,10 @@ define(['handlebars'], function(Handlebars) {

this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/amd.html"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true});
this["JST"]["test/fixtures/amd.html"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true});

return this["JST"];

});
});
8 changes: 4 additions & 4 deletions test/expected/amd_compile_array.js
@@ -1,7 +1,7 @@
define(['handlebars', 'handlebars.helpers'], function(Handlebars) {

return Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})
return Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})

});
});
8 changes: 4 additions & 4 deletions test/expected/amd_compile_direct.js
@@ -1,7 +1,7 @@
define(['handlebars'], function(Handlebars) {

return Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})
return Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})

});
});
4 changes: 2 additions & 2 deletions test/expected/amd_compile_function.js
@@ -1,7 +1,7 @@
define(['handlebars', 'custom dependency'], function(Handlebars) {

return Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})

});
});
8 changes: 4 additions & 4 deletions test/expected/amd_compile_string_deps.js
@@ -1,7 +1,7 @@
define(['handlebars', 'handlebars.helpers'], function(Handlebars) {

return Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})
return Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})

});
});
8 changes: 4 additions & 4 deletions test/expected/amd_compile_string_path.js
@@ -1,7 +1,7 @@
define(['lib/handlebars'], function(Handlebars) {

return Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})
return Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true})

});
});
8 changes: 4 additions & 4 deletions test/expected/amd_namespace.js
Expand Up @@ -2,10 +2,10 @@ define(['handlebars', 'handlebars.helpers'], function(Handlebars) {

this["foo"] = this["foo"] || {};

this["foo"]["test/fixtures/amd.html"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true});
this["foo"]["test/fixtures/amd.html"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with amd support</p>\n</section>";
},"useData":true});

return this["foo"];

});
});
14 changes: 7 additions & 7 deletions test/expected/amd_namespace_as_function.js
Expand Up @@ -6,14 +6,14 @@ this["JST"]["countries"] = this["JST"]["countries"] || {};
this["JST"]["treeNav"] = this["JST"]["treeNav"] || {};
this["JST"]["treeNav"]["leaves"] = this["JST"]["treeNav"]["leaves"] || {};

this["JST"]["countries"]["basic"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});
this["JST"]["countries"]["basic"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});

this["JST"]["treeNav"]["leaves"]["basic"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});
this["JST"]["treeNav"]["leaves"]["basic"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});

return this["JST"];

});
});
8 changes: 4 additions & 4 deletions test/expected/amd_partials_no_namespace.js
Expand Up @@ -2,20 +2,20 @@ define(['handlebars'], function(Handlebars) {

this["JST"] = this["JST"] || {};

Handlebars.registerPartial("partial", Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
Handlebars.registerPartial("partial", Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<span>Canada</span>";
},"useData":true}));

this["JST"]["test/fixtures/one.hbs"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
this["JST"]["test/fixtures/one.hbs"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper;

return "<p>Hello, my name is "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"name","hash":{},"data":data}) : helper)))
+ ". I live in "
+ ((stack1 = container.invokePartial(partials.partial,depth0,{"name":"partial","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ "</p>";
},"usePartial":true,"useData":true});

return this["JST"];

});
});
8 changes: 4 additions & 4 deletions test/expected/amd_partials_use_namespace.js
Expand Up @@ -2,20 +2,20 @@ define(['handlebars'], function(Handlebars) {

this["JST"] = this["JST"] || {};

Handlebars.registerPartial("partial", this["JST"]["partial"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
Handlebars.registerPartial("partial", this["JST"]["partial"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<span>Canada</span>";
},"useData":true}));

this["JST"]["test/fixtures/one.hbs"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
this["JST"]["test/fixtures/one.hbs"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper;

return "<p>Hello, my name is "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"name","hash":{},"data":data}) : helper)))
+ ". I live in "
+ ((stack1 = container.invokePartial(partials.partial,depth0,{"name":"partial","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ "</p>";
},"usePartial":true,"useData":true});

return this["JST"];

});
});
8 changes: 4 additions & 4 deletions test/expected/commonjs_compile.js
Expand Up @@ -2,10 +2,10 @@ module.exports = function(Handlebars) {

this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/commonjs.html"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with CommonJS support</p>\n</section>\n";
},"useData":true});
this["JST"]["test/fixtures/commonjs.html"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with CommonJS support</p>\n</section>\n";
},"useData":true});

return this["JST"];

};
};
8 changes: 4 additions & 4 deletions test/expected/commonjs_compile_direct.js
@@ -1,7 +1,7 @@
module.exports = function(Handlebars) {

return Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with CommonJS support</p>\n</section>\n";
},"useData":true});
return Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<section class=\"main-app\">\n <h1>Some title</h1>\n <p>I've been compiled with CommonJS support</p>\n</section>\n";
},"useData":true});

};
};
6 changes: 3 additions & 3 deletions test/expected/custom_separator.js
@@ -1,3 +1,3 @@
this["JST"] = this["JST"] || {};;;;;;this["JST"]["test/fixtures/basic.hbs"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});
this["JST"] = this["JST"] || {};;;;;;this["JST"]["test/fixtures/basic.hbs"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});
38 changes: 13 additions & 25 deletions test/expected/handlebars-node.js
Expand Up @@ -4,30 +4,18 @@ Handlebars = glob.Handlebars || require('handlebars');

this["JST"] = this["JST"] || {};

Handlebars.registerPartial("partial", Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};



return "<span>Canada</span>";
}));

this["JST"]["test/fixtures/one.hbs"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); partials = this.merge(partials, Handlebars.partials); data = data || {};
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;


buffer += "<p>Hello, my name is ";
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = (depth0 && depth0.name); stack1 = typeof stack1 === functionType ? stack1.call(depth0, {hash:{},data:data}) : stack1; }
buffer += escapeExpression(stack1)
+ ". I live in ";
stack1 = self.invokePartial(partials.partial, 'partial', depth0, helpers, partials, data);
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "</p>";
return buffer;
});
Handlebars.registerPartial("partial", Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<span>Canada</span>";
},"useData":true}));

this["JST"]["test/fixtures/one.hbs"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper;

return "<p>Hello, my name is "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"name","hash":{},"data":data}) : helper)))
+ ". I live in "
+ ((stack1 = container.invokePartial(partials.partial,depth0,{"name":"partial","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ "</p>";
},"usePartial":true,"useData":true});

if (typeof exports === 'object' && exports) {module.exports = this["JST"];}
38 changes: 13 additions & 25 deletions test/expected/handlebars.js
@@ -1,27 +1,15 @@
this["JST"] = this["JST"] || {};

Handlebars.registerPartial("partial", Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};



return "<span>Canada</span>";
}));

this["JST"]["test/fixtures/one.hbs"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); partials = this.merge(partials, Handlebars.partials); data = data || {};
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;


buffer += "<p>Hello, my name is ";
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = (depth0 && depth0.name); stack1 = typeof stack1 === functionType ? stack1.call(depth0, {hash:{},data:data}) : stack1; }
buffer += escapeExpression(stack1)
+ ". I live in ";
stack1 = self.invokePartial(partials.partial, 'partial', depth0, helpers, partials, data);
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "</p>";
return buffer;
});
Handlebars.registerPartial("partial", Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<span>Canada</span>";
},"useData":true}));

this["JST"]["test/fixtures/one.hbs"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper;

return "<p>Hello, my name is "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"name","hash":{},"data":data}) : helper)))
+ ". I live in "
+ ((stack1 = container.invokePartial(partials.partial,depth0,{"name":"partial","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ "</p>";
},"usePartial":true,"useData":true});
14 changes: 7 additions & 7 deletions test/expected/handlebarsnowrap.js
@@ -1,15 +1,15 @@
this["JST"] = this["JST"] || {};

Handlebars.registerPartial("partial", {"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<span>Canada</span>";
},"useData":true});
Handlebars.registerPartial("partial", {"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "<span>Canada</span>";
},"useData":true});

this["JST"]["test/fixtures/one.hbs"] = {"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
this["JST"]["test/fixtures/one.hbs"] = {"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper;

return "<p>Hello, my name is "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"name","hash":{},"data":data}) : helper)))
+ ". I live in "
+ ((stack1 = container.invokePartial(partials.partial,depth0,{"name":"partial","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ "</p>";
},"usePartial":true,"useData":true};
},"usePartial":true,"useData":true};
10 changes: 5 additions & 5 deletions test/expected/known_helpers.js
Expand Up @@ -2,13 +2,13 @@ this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/uses_helpers.hbs"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
return "";
},"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, options, buffer =
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, buffer =
"This template uses custom helpers: "
+ container.escapeExpression(helpers["my-helper"].call(depth0,"variable",{"name":"my-helper","hash":{},"data":data}))
+ container.escapeExpression(helpers["my-helper"].call(alias1,"variable",{"name":"my-helper","hash":{},"data":data}))
+ " & ";
stack1 = ((helper = (helper = helpers["another-helper"] || (depth0 != null ? depth0["another-helper"] : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"another-helper","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(depth0,options) : helper));
stack1 = ((helper = (helper = helpers["another-helper"] || (depth0 != null ? depth0["another-helper"] : depth0)) != null ? helper : helpers.helperMissing),(options={"name":"another-helper","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(alias1,options) : helper));
if (!helpers["another-helper"]) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)}
if (stack1 != null) { buffer += stack1; }
return buffer + "!\n";
},"useData":true});
},"useData":true});
13 changes: 6 additions & 7 deletions test/expected/namespace_as_function.js
Expand Up @@ -4,11 +4,10 @@ this["JST"]["countries"] = this["JST"]["countries"] || {};
this["JST"]["treeNav"] = this["JST"]["treeNav"] || {};
this["JST"]["treeNav"]["leaves"] = this["JST"]["treeNav"]["leaves"] || {};

this["JST"]["countries"]["basic"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});
this["JST"]["countries"]["basic"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});


this["JST"]["treeNav"]["leaves"]["basic"] = Handlebars.template({"compiler":[7,">=4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});
this["JST"]["treeNav"]["leaves"]["basic"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
return "Basic template that does nothing.";
},"useData":true});

0 comments on commit 60670fc

Please sign in to comment.