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-binding-blowback-d/_config.js

24 lines
441 B

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