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

26 lines
446 B

export default {
html: `
<input>
<p>foo</p>
`,
ssrHtml: `
<input value=foo>
<p>foo</p>
`,
async test({ assert, component, target, window }) {
const event = new window.MouseEvent('input');
const input = target.querySelector('input');
input.value = 'blah';
await input.dispatchEvent(event);
assert.deepEqual(component.deep, { name: 'blah' });
assert.htmlEqual(target.innerHTML, `
<input>
<p>blah</p>
`);
},
};