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/binding-this-and-value/_config.js

25 lines
416 B

export default {
html: `
<input>
<p>value: initial</p>
`,
ssrHtml: `
<input value="initial">
<p>value: initial</p>
`,
async test({ assert, target, window }) {
const input = target.querySelector('input');
const event = new window.Event('input');
input.value = 'changed';
await input.dispatchEvent(event);
assert.htmlEqual(target.innerHTML, `
<input>
<p>value: changed</p>
`);
}
};