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
436 B

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