import * as assert from 'assert';
export default {
data: {
items: [
{ description: 'one' },
{ description: 'two' },
{ description: 'three' }
]
},
html: `
`,
test ( component, target, window ) {
const inputs = [ ...target.querySelectorAll( 'input' ) ];
assert.equal( inputs[0].value, 'one' );
const event = new window.Event( 'input' );
inputs[1].value = 'four';
inputs[1].dispatchEvent( event );
assert.equal( target.innerHTML, `` );
const items = component.get( 'items' );
items[2].description = 'five';
component.set({ items });
assert.equal( inputs[2].value, 'five' );
assert.equal( target.innerHTML, `` );
}
};