Skip to content

Commit 87a5119

Browse files
author
Brian Whitton
committed
failing test for bad markup
1 parent e6d8f06 commit 87a5119

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

tests/integration/instance-initializers/clear-double-boot-test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,22 @@ module('Instance-initializer: clear-double-boot', function(hooks) {
1818
assert.notOk(this.element.querySelector('#fastboot-body-end'), 'There is no end marker');
1919
assert.notOk(this.element.querySelector('#content-in-between'), 'The content is between is gone');
2020
});
21+
22+
test('It can handle bad markup', async function(assert) {
23+
this.set('BAD_HTML', `
24+
<script type="x/boundary" id="fastboot-body-start"></script>
25+
<div id="content-in-between">
26+
<em><em>
27+
</div>
28+
<script type="x/boundary" id="fastboot-body-end"></script>
29+
`);
30+
31+
// render the whole tree dynamically to more closely mimc bad markup cases
32+
await render(hbs`{{{BAD_HTML}}}`);
33+
34+
clearHtml();
35+
assert.notOk(this.element.querySelector('#fastboot-body-start'), 'There is no start marker');
36+
assert.notOk(this.element.querySelector('#fastboot-body-end'), 'There is no end marker');
37+
assert.notOk(this.element.querySelector('#content-in-between'), 'The content is between is gone');
38+
})
2139
});

0 commit comments

Comments
 (0)