mirror of https://github.com/sveltejs/svelte
remove components without props from each block - fixes #3035
parent
35001b36cc
commit
7696c1fa6e
@ -0,0 +1 @@
|
||||
<p>hello</p>
|
@ -0,0 +1,10 @@
|
||||
export default {
|
||||
html: `
|
||||
<p>hello</p>
|
||||
`,
|
||||
|
||||
async test({ assert, component, target }) {
|
||||
await component.remove();
|
||||
assert.htmlEqual(target.innerHTML, ``);
|
||||
}
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
<script>
|
||||
import Child from './Child.svelte';
|
||||
|
||||
let items = [1];
|
||||
|
||||
export function remove() {
|
||||
items = [];
|
||||
}
|
||||
</script>
|
||||
|
||||
{#each items as item}
|
||||
<Child/>
|
||||
{/each}
|
Loading…
Reference in new issue