mirror of https://github.com/sveltejs/svelte
failing test for #850
parent
049fe59082
commit
40df1c64ac
@ -0,0 +1,3 @@
|
|||||||
|
<div>
|
||||||
|
<slot/>
|
||||||
|
</div>
|
@ -0,0 +1,17 @@
|
|||||||
|
export default {
|
||||||
|
solo: true,
|
||||||
|
html: `
|
||||||
|
<div>
|
||||||
|
<p>unconditional</p>
|
||||||
|
</div>`,
|
||||||
|
|
||||||
|
test(assert, component, target) {
|
||||||
|
component.set({ foo: true });
|
||||||
|
assert.htmlEqual(target.innerHTML, `
|
||||||
|
<div>
|
||||||
|
<p>conditional</p>
|
||||||
|
<p>unconditional</p>
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,17 @@
|
|||||||
|
<Nested>
|
||||||
|
{{#if foo}}
|
||||||
|
<p>conditional</p>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<p>unconditional</p>
|
||||||
|
</Nested>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Nested from './Nested.html';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Nested
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in new issue