mirror of https://github.com/sveltejs/svelte
				
				
				
			failing test for #1217
	
		
	
				
					
				
			
							parent
							
								
									22f0ed9bbf
								
							
						
					
					
						commit
						58d5c2040a
					
				| @ -0,0 +1,17 @@ | ||||
| export default { | ||||
| 	html: ` | ||||
| 		<button>racoon</button><button>eagle</button> | ||||
| 	`,
 | ||||
| 
 | ||||
| 	test ( assert, component, target ) { | ||||
| 		assert.htmlEqual( target.innerHTML, ` | ||||
| 			<button>racoon</button><button>eagle</button> | ||||
| 		`);
 | ||||
| 
 | ||||
| 		const button = target.querySelector( 'button' ); | ||||
| 		const event = new window.MouseEvent( 'click' ); | ||||
| 
 | ||||
| 		button.dispatchEvent( event ); | ||||
| 		assert.equal( component.get( 'clicked' ), 'racoon' ); | ||||
| 	}, | ||||
| }; | ||||
| @ -0,0 +1,11 @@ | ||||
| {{#each ['racoon', 'eagle'] as animal}} | ||||
|   <button on:click="set({clicked: animal})">{{animal}}</button> | ||||
| {{/each}} | ||||
| 
 | ||||
| <script> | ||||
| 	export default { | ||||
| 		data: () => ({ | ||||
| 			clicked: null, | ||||
| 		}), | ||||
| 	}; | ||||
| </script> | ||||
					Loading…
					
					
				
		Reference in new issue