import * as assert from 'assert'; import './main.svelte'; export default async function (target) { target.innerHTML = ''; const el = target.querySelector('my-app'); const counter = el.shadowRoot.querySelector('my-counter'); const button = counter.shadowRoot.querySelector('button'); assert.equal(counter.count, 0); assert.equal(counter.shadowRoot.innerHTML, ''); await button.dispatchEvent(new MouseEvent('click')); assert.equal(counter.count, 1); assert.equal(counter.shadowRoot.innerHTML, ''); }