Skip to content

Commit

Permalink
test for multiline param in defs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasiliy Glazkov committed Feb 14, 2017
1 parent b9a1ec6 commit 165d9a8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/defines.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ describe('defines', function() {
it('should render define', function(){
testDef('{{##def.tmp:foo:<div>{{!foo}}</div>#}}{{ var bar = it.foo; }}{{# def.tmp:bar }}');
});

it('should render define multiline params', function(){
testDef('{{##def.tmp:data:{{=data.openTag}}{{!data.foo}}{{=data.closeTag}}#}}\n' +
'{{# def.tmp:{\n' +
' foo: it.foo,\n' +
' openTag: "<div>",\n' +
' closeTag: "</div>"\n' +
'} }}');
});
});

function testDef(tmpl, defines) {
Expand Down

0 comments on commit 165d9a8

Please # to comment.