mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Added negative test for an incorrectly used nested tag
This commit is contained in:
parent
93c6c9b0e0
commit
39df6d2faa
0
test/fixtures/templates/nested-tags-missing-parent/expected.html
vendored
Normal file
0
test/fixtures/templates/nested-tags-missing-parent/expected.html
vendored
Normal file
12
test/fixtures/templates/nested-tags-missing-parent/template.marko
vendored
Normal file
12
test/fixtures/templates/nested-tags-missing-parent/template.marko
vendored
Normal 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>
|
||||
11
test/fixtures/templates/nested-tags-missing-parent/test.js
vendored
Normal file
11
test/fixtures/templates/nested-tags-missing-parent/test.js
vendored
Normal 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>');
|
||||
}
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user