mirror of https://github.com/sveltejs/svelte
parent
7c0986fded
commit
f8ca0d4efe
@ -0,0 +1 @@
|
|||||||
|
<p>{thing}</p>
|
@ -0,0 +1,20 @@
|
|||||||
|
export default {
|
||||||
|
data: {
|
||||||
|
visible: true,
|
||||||
|
empty: []
|
||||||
|
},
|
||||||
|
|
||||||
|
html: `
|
||||||
|
<div>
|
||||||
|
<p>text</p>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
|
||||||
|
nestedTransitions: true,
|
||||||
|
|
||||||
|
test(assert, component, target) {
|
||||||
|
component.set({ visible: false });
|
||||||
|
|
||||||
|
assert.htmlEqual(target.innerHTML, ``);
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,17 @@
|
|||||||
|
{#if visible}
|
||||||
|
<div>
|
||||||
|
{#each empty as thing}
|
||||||
|
<Thing {thing}/>
|
||||||
|
{/each}
|
||||||
|
|
||||||
|
<p>text</p>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Thing: './Thing.html'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in new issue