Added negative test for an incorrectly used nested tag

This commit is contained in:
Patrick Steele-Idem 2015-04-24 08:45:33 -06:00
parent 93c6c9b0e0
commit 39df6d2faa
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,12 @@
<div>
<test-nested-tags-overlay.header class="my-header">
Header content
</test-nested-tags-overlay.header>
Body content
<test-nested-tags-overlay.footer class="my-footer">
Footer content
</test-nested-tags-overlay.footer>
</div>

View File

@ -0,0 +1,11 @@
var expect = require('chai').expect;
exports.templateData = {};
exports.options = {
handleCompileError: function(e) {
expect(e.toString()).to.contain('Tag not nested within a');
expect(e.toString()).to.contain('<test-nested-tags-overlay>');
expect(e.toString()).to.contain('<test-nested-tags-overlay.header>');
expect(e.toString()).to.contain('<test-nested-tags-overlay.footer>');
}
};