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/runtime/samples/event-handler-sanitize/_config.js

22 lines
418 B

export default {
html: `
<div>toggle</div>
`,
test ( assert, component, target, window ) {
const div = target.querySelector( 'div' );
const event = new window.MouseEvent( 'some-event' );
div.dispatchEvent( event );
assert.htmlEqual( target.innerHTML, `
<div>toggle</div>
<p>hello!</p>
` );
div.dispatchEvent( event );
assert.htmlEqual( target.innerHTML, `
<div>toggle</div>
` );
}
};