export default { data: { foo: [ 1 ], bar: [ 2 ], clicked: 'neither' }, html: `
clicked: neither
`, test ( assert, component, target, window ) { const buttons = target.querySelectorAll( 'button' ); const event = new window.MouseEvent( 'click' ); buttons[0].dispatchEvent( event ); assert.equal( component.get().clicked, 'foo' ); assert.htmlEqual( target.innerHTML, `clicked: foo
` ); buttons[1].dispatchEvent( event ); assert.equal( component.get().clicked, 'bar' ); assert.htmlEqual( target.innerHTML, `clicked: bar
` ); component.destroy(); } };