This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/client/node_modules/@testing-library/user-event/dist/cjs/convenience/click.js

36 lines
706 B
JavaScript
Raw Normal View History

2025-06-13 06:04:40 +00:00
'use strict';
async function click(element) {
const pointerIn = [];
if (!this.config.skipHover) {
pointerIn.push({
target: element
});
}
pointerIn.push({
keys: '[MouseLeft]',
target: element
});
return this.pointer(pointerIn);
}
async function dblClick(element) {
return this.pointer([
{
target: element
},
'[MouseLeft][MouseLeft]'
]);
}
async function tripleClick(element) {
return this.pointer([
{
target: element
},
'[MouseLeft][MouseLeft][MouseLeft]'
]);
}
exports.click = click;
exports.dblClick = dblClick;
exports.tripleClick = tripleClick;