From ee913e28bd34dc6e97f98a99f00b484195f72d6f Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Mon, 2 Jan 2017 10:13:49 +0100 Subject: [PATCH] Added tests for multiple partial-block calls with inline partials - nested inline partials with partial-blocks on different nesting levels - nested inline partials (twice at each level) --- spec/partials.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/partials.js b/spec/partials.js index 0434cbff..266837db 100644 --- a/spec/partials.js +++ b/spec/partials.js @@ -409,6 +409,24 @@ describe('partials', function() { true, 'success'); }); + it('should render nested inline partials with partial-blocks on different nesting levels', function() { + shouldCompileToWithPartials( + '{{#*inline "outer"}}{{#>inner}}{{>@partial-block}}{{/inner}}{{>@partial-block}}{{/inline}}' + + '{{#*inline "inner"}}{{>@partial-block}}{{/inline}}' + + '{{#>outer}}{{value}}{{/outer}}', + [{value: 'success'}, {}, {}], + true, + 'successsuccess'); + }); + it('should render nested inline partials (twice at each level)', function() { + shouldCompileToWithPartials( + '{{#*inline "outer"}}{{#>inner}}{{>@partial-block}} {{>@partial-block}}{{/inner}}{{/inline}}' + + '{{#*inline "inner"}}{{>@partial-block}}{{>@partial-block}}{{/inline}}' + + '{{#>outer}}{{value}}{{/outer}}', + [{value: 'success'}, {}, {}], + true, + 'success successsuccess success'); + }); }); it('should pass compiler flags', function() {