export default { data: { prop: 'bar', objects: [{ foo: 'a', bar: 'b', baz: 'c' }] }, html: `
{"foo":"a","bar":"b","baz":"c"}
`, test ( assert, component, target, window ) { const input = target.querySelector( 'input' ); const event = new window.Event( 'input' ); assert.equal( input.value, 'b' ); // edit bar input.value = 'e'; input.dispatchEvent( event ); assert.htmlEqual( target.innerHTML, `
{"foo":"a","bar":"e","baz":"c"}
` ); // edit baz component.set({ prop: 'baz' }); assert.equal( input.value, 'c' ); input.value = 'f'; input.dispatchEvent( event ); assert.htmlEqual( target.innerHTML, `
{"foo":"a","bar":"e","baz":"f"}
` ); // edit foo component.set({ prop: 'foo' }); assert.equal( input.value, 'a' ); input.value = 'd'; input.dispatchEvent( event ); assert.htmlEqual( target.innerHTML, `
{"foo":"d","bar":"e","baz":"f"}
` ); } };