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/function-expression-inline/_config.js

22 lines
385 B

export default {
html: `
<button>click me</button>
<p>1</p>
<p>2</p>
<p>3</p>
`,
async test({ assert, target, window }) {
const button = target.querySelector('button');
const click = new window.MouseEvent('click');
await button.dispatchEvent(click);
assert.htmlEqual(target.innerHTML, `
<button>click me</button>
<p>2</p>
<p>4</p>
<p>6</p>
`);
}
};