Added tests for using hyphens with @ tags

This commit is contained in:
Patrick Steele-Idem 2017-04-20 13:54:08 -06:00
parent 57a94d6de0
commit e03362d942
9 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,5 @@
{
"@test-items <test-item>[]": {
"@title": "string"
}
}

View File

@ -0,0 +1,6 @@
<ul>
<li for(item in input.testItems)>
<h1>${item.title}</h1>
<include(item.renderBody)/>
</li>
</ul>

View File

@ -0,0 +1 @@
<ul><li><h1>Item 1 title</h1>Item 1 body</li><li><h1>Item 2 title</h1>Item 2 body</li></ul>

View File

@ -0,0 +1,4 @@
<test-message>
<@test-item title="Item 1 title">Item 1 body</@test-item>
<@test-item title="Item 2 title">Item 2 body</@test-item>
</test-message>

View File

@ -0,0 +1,7 @@
exports.templateData = {
header: {
renderBody: function(out) {
out.write('Header content!');
}
}
};

View File

@ -0,0 +1,5 @@
<div class="message">
<h1>
<include(input.myTitle)/>
</h1>
</div>

View File

@ -0,0 +1 @@
<div class="message"><h1>My title</h1></div>

View File

@ -0,0 +1,3 @@
<test-message>
<@my-title>My title</@my-title>
</test-message>

View File

@ -0,0 +1,7 @@
exports.templateData = {
header: {
renderBody: function(out) {
out.write('Header content!');
}
}
};