Testcase for accessing @root from a partial-block

related to #1445
This commit is contained in:
Nils Knappmeier
2018-05-31 23:12:08 +02:00
parent cda544bca9
commit 30df8a1ac7
+9
View File
@@ -263,6 +263,15 @@ describe('partials', function() {
true,
'success');
});
it('should be able to access the @data frame from a partial-block', function() {
shouldCompileToWithPartials(
'{{#> dude}}in-block: {{@root/value}}{{/dude}}',
[{value: 'success'}, {}, {dude: '<code>before-block: {{@root/value}} {{> @partial-block }}</code>'}],
true,
'<code>before-block: success in-block: success</code>');
});
it('should allow the #each-helper to be used along with partial-blocks', function() {
shouldCompileToWithPartials(
'<template>{{#> list value}}value = {{.}}{{/list}}</template>',