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/action-body/_config.js

19 lines
464 B

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>');
}
};