@testing-library/user-event
Version:
Fire events the same way the user does
17 lines (14 loc) • 428 B
JavaScript
import '../utils/dataTransfer/Clipboard.js';
import { assertPointerEvents } from '../utils/pointer/cssPointerEvents.js';
async function hover(element) {
return this.pointer({
target: element
});
}
async function unhover(element) {
assertPointerEvents(this, this.system.pointer.getMouseTarget(this));
return this.pointer({
target: element.ownerDocument.body
});
}
export { hover, unhover };