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/each-block-deconflict-name-.../_config.js

31 lines
440 B

export default {
props: {
foo: {
bar: ['x', 'y', 'z']
}
},
html: `
<input>
<input>
<input>
`,
ssrHtml: `
<input value=x>
<input value=y>
<input value=z>
`,
test({ assert, component, target, window }) {
const inputs = target.querySelectorAll('input');
inputs[1].value = 'w';
inputs[1].dispatchEvent(new window.MouseEvent('input'));
assert.deepEqual(component.foo, {
bar: ['x', 'w', 'z']
});
}
};