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/each-blocks-assignment-2/_config.js

21 lines
399 B

export default {
html: `
<span class="content">foo</span>
<button>Test</button>
`,
async test({ assert, target, window }) {
const button = target.querySelector('button');
const clickEvent = new window.MouseEvent('click');
await button.dispatchEvent(clickEvent);
assert.htmlEqual(
target.innerHTML,
`
<span class="content">bar</span>
<button>Test</button>
`
);
}
};