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-block-keyed-index-in-e.../_config.js

19 lines
413 B

export default {
html: `
<button>remove</button>
<button>remove</button>
<button>remove</button>
`,
async test({ assert, target, window }) {
const click = new window.MouseEvent('click');
await target.querySelectorAll('button')[1].dispatchEvent(click);
await target.querySelectorAll('button')[1].dispatchEvent(click);
assert.htmlEqual(target.innerHTML, `
<button>remove</button>
`);
}
};