mirror of https://github.com/sveltejs/svelte
parent
83318b6bf5
commit
bc0f381b34
@ -1,11 +1,13 @@
|
||||
export default {
|
||||
test(assert, component, target, window) {
|
||||
assert.equal(component.events.toString(), '');
|
||||
assert.deepEqual(component.events, []);
|
||||
|
||||
const event1 = new window.Event('mouseenter');
|
||||
window.document.dispatchEvent(event1);
|
||||
assert.equal(component.events.toString(), 'enter');
|
||||
assert.deepEqual(component.events, ['enter']);
|
||||
|
||||
const event2 = new window.Event('mouseleave');
|
||||
window.document.dispatchEvent(event2);
|
||||
assert.equal(component.events.toString(), 'enter,leave');
|
||||
assert.deepEqual(component.events, ['enter', 'leave']);
|
||||
},
|
||||
};
|
Loading…
Reference in new issue