You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/instrumentation-script-loop.../_config.js

18 lines
355 B

export default {
html: `
<button>foo</button>
<p>x: 0</p>
`,
async test({ assert, component, target, window }) {
const buttons = target.querySelectorAll('button');
const click = new window.MouseEvent('click');
await buttons[0].dispatchEvent(click);
assert.htmlEqual(target.innerHTML, `
<button>foo</button>
<p>x: 42</p>
`);
}
};