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-e/_config.js

24 lines
465 B

export default {
html: `
<button>click me</button>
<button>click me</button>
<p>{"value":{"i":0,"j":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":{"i":0,"j":0}}</p>
<p>{"value":{"i":1,"j":0}}</p>
`);
}
};