You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/generator/samples/event-handler-event-methods/_config.js

13 lines
443 B

export default {
test ( assert, component, target, window ) {
const allow = target.querySelector( '.allow-propagation' );
const stop = target.querySelector( '.stop-propagation' );
allow.dispatchEvent( new window.MouseEvent( 'click', { bubbles: true }) );
stop.dispatchEvent( new window.MouseEvent( 'click', { bubbles: true }) );
assert.equal( component.get( 'foo' ), true );
assert.equal( component.get( 'bar' ), false );
}
};