mirror of https://github.com/sveltejs/svelte
parent
80ef6f190d
commit
370e117eea
@ -0,0 +1,3 @@
|
|||||||
|
<svelte:options tag="my-block"/>
|
||||||
|
|
||||||
|
<div><slot></slot></div>
|
@ -0,0 +1,7 @@
|
|||||||
|
<svelte:options tag="my-app"/>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Block from './Block.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Block><strong>Name</strong></Block>
|
@ -0,0 +1,13 @@
|
|||||||
|
import * as assert from 'assert';
|
||||||
|
import './main.svelte';
|
||||||
|
|
||||||
|
export default async function (target) {
|
||||||
|
target.innerHTML = '<my-app/>';
|
||||||
|
const el = target.querySelector('my-app');
|
||||||
|
|
||||||
|
const block = el.shadowRoot.children[0];
|
||||||
|
|
||||||
|
const [slot] = block.children;
|
||||||
|
|
||||||
|
assert.equal(slot.assignedNodes().length, 1);
|
||||||
|
}
|
Loading…
Reference in new issue