Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
click: async () => {
const el = await elem();
await fireEvent.mouseDown(el);
if (elementIsFocusable(el)) {
if (document.activeElement != el) {
if (document.activeElement) {
fireEvent.blur(document.activeElement);
}
if (!el.disabled) {
el.focus();
await fireEvent.focus(el);
}
}
}
await fireEvent.mouseUp(el);
await fireEvent.click(el);
if (isCheckable(el)) {
handleCheckableInput(el as HTMLInputElement);
}
},
mouse: {