Skip to content

Commit

Permalink
Fix issue with comments breaking blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
John Ratcliff committed May 9, 2016
1 parent 06c8fc5 commit 4baed0d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/integration/mustaches-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,3 +425,27 @@ test("multi-line mustaches can have array indexes with blocks", function(){
compilesTo(emblem,
'{{#my-component value=child.[0]}}Thing{{/my-component}}');
});

test("mustaches with else statement", function(){
var emblem = w(
'some-component-with-inverse-yield',
' |foo',
'else',
' |bar'
);
compilesTo(emblem,
'{{#some-component-with-inverse-yield}}foo{{else}}bar{{/some-component-with-inverse-yield}}');
});

test("mustaches with blocks and comments", function(){
var emblem = w(
'/ Hi',
'= if foo',
' p Hi',
'/ Bye',
'= else if bar',
' p bye'
);
compilesTo(emblem,
'{{#if foo}}<p>Hi</p>{{else if bar}}<p>bye</p>{{/if}}');
});

0 comments on commit 4baed0d

Please sign in to comment.