export default {
props: {
items: [
{ description: 'one' },
{ description: 'two' },
{ description: 'three' },
],
},
html: `
`,
ssrHtml: `
`,
async test({ assert, component, target, window }) {
const inputs = [...target.querySelectorAll('input')];
assert.equal(inputs[0].value, 'one');
const event = new window.Event('input');
inputs[1].value = 'four';
await inputs[1].dispatchEvent(event);
assert.htmlEqual(target.innerHTML, `
`);
const items = component.items;
items[2].description = 'five';
component.items = items;
assert.equal(inputs[2].value, 'five');
assert.htmlEqual(target.innerHTML, `
`);
},
};