mirror of https://github.com/sveltejs/svelte
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.
19 lines
464 B
19 lines
464 B
3 years ago
|
export default {
|
||
|
html: '<div></div>',
|
||
|
|
||
|
async test({ assert, target, window }) {
|
||
|
const enter = new window.MouseEvent('mouseenter');
|
||
|
const leave = new window.MouseEvent('mouseleave');
|
||
|
|
||
|
await window.document.body.dispatchEvent(enter);
|
||
|
assert.htmlEqual(target.innerHTML, `
|
||
|
<div>
|
||
|
<div class="tooltip">Perform an Action</div>
|
||
|
</div>
|
||
|
`);
|
||
|
|
||
|
await window.document.body.dispatchEvent(leave);
|
||
|
assert.htmlEqual(target.innerHTML, '<div></div>');
|
||
|
}
|
||
|
};
|