mirror of https://github.com/sveltejs/svelte
add each_value to contextProps - fixes #1206
parent
a8f94f0898
commit
ddd67dd844
@ -1,17 +1,19 @@
|
|||||||
export default {
|
export default {
|
||||||
html: `
|
html: `
|
||||||
<button>racoon</button><button>eagle</button>
|
<button>racoon</button>
|
||||||
|
<button>eagle</button>
|
||||||
`,
|
`,
|
||||||
|
|
||||||
test ( assert, component, target ) {
|
test(assert, component, target) {
|
||||||
assert.htmlEqual( target.innerHTML, `
|
assert.htmlEqual(target.innerHTML,`
|
||||||
<button>racoon</button><button>eagle</button>
|
<button>racoon</button>
|
||||||
|
<button>eagle</button>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
const button = target.querySelector( 'button' );
|
const button = target.querySelector('button');
|
||||||
const event = new window.MouseEvent( 'click' );
|
const event = new window.MouseEvent('click');
|
||||||
|
|
||||||
button.dispatchEvent( event );
|
button.dispatchEvent(event);
|
||||||
assert.equal( component.get( 'clicked' ), 'racoon' );
|
assert.equal(component.get('clicked'), 'racoon');
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in new issue