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/component-template-inline-m.../_config.js

15 lines
387 B

export default {
async test({ assert, target }) {
const btns = target.querySelectorAll('button');
const event = new window.MouseEvent('click');
await btns[0].dispatchEvent(event);
await btns[0].dispatchEvent(event);
await btns[1].dispatchEvent(event);
await btns[1].dispatchEvent(event);
await btns[1].dispatchEvent(event);
assert.equal(btns[1].innerHTML, '3');
}
};