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/document-event/_config.js

11 lines
427 B

export default {
test(assert, component, target, window) {
assert.equal(component.get().events.toString(), '');
const event1 = new window.Event('mouseenter');
window.document.dispatchEvent(event1);
assert.equal(component.get().events.toString(), 'enter');
const event2 = new window.Event('mouseleave');
window.document.dispatchEvent(event2);
assert.equal(component.get().events.toString(), 'enter,leave');
},
};