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-update/_config.js

18 lines
354 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: 1</p>
`);
}
};