import * as assert from 'assert'; import { tick } from 'svelte'; import './main.svelte'; export default async function (target) { target.innerHTML = ` hello worldbyeworld hello worldhello worldbye world `; await tick(); const [a, b] = target.querySelectorAll('custom-element'); assert.htmlEqual( a.shadowRoot.innerHTML, `

$$slots: {"a":true,"default":true}

Slot b is not available

` ); assert.htmlEqual( b.shadowRoot.innerHTML, `

$$slots: {"a":true,"b":true,"default":true}

` ); assert.equal(a.getData(), ''); assert.equal(b.getData(), 'foo'); }