Skip to content

Commit

Permalink
fix: remove/ignore uncovered branches
Browse files Browse the repository at this point in the history
  • Loading branch information
ph-fritsche committed Mar 19, 2021
1 parent c8c1e79 commit a758238
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/clear.ts
Expand Up @@ -29,8 +29,10 @@ function clear(element: Element) {

type(element, '{selectall}{del}', {
delay: 0,
initialSelectionStart: el.selectionStart ?? undefined,
initialSelectionEnd: el.selectionEnd ?? undefined,
initialSelectionStart:
el.selectionStart ?? /* istanbul ignore next */ undefined,
initialSelectionEnd:
el.selectionEnd ?? /* istanbul ignore next */ undefined,
})

if (elementType !== 'textarea') {
Expand Down
12 changes: 6 additions & 6 deletions src/click.ts
Expand Up @@ -26,8 +26,8 @@ export declare interface clickOptions {

function clickLabel(
label: HTMLLabelElement,
init?: MouseEventInit,
{clickCount}: clickOptions = {},
init: MouseEventInit | undefined,
{clickCount}: clickOptions,
) {
if (isLabelWithInternallyDisabledControl(label)) return

Expand All @@ -47,8 +47,8 @@ function clickLabel(

function clickBooleanElement(
element: HTMLInputElement,
init?: MouseEventInit,
{clickCount}: clickOptions = {},
init: MouseEventInit | undefined,
{clickCount}: clickOptions,
) {
fireEvent.pointerDown(element, init)
if (!element.disabled) {
Expand All @@ -70,8 +70,8 @@ function clickBooleanElement(

function clickElement(
element: Element,
init?: MouseEventInit,
{clickCount}: clickOptions = {},
init: MouseEventInit | undefined,
{clickCount}: clickOptions,
) {
const previousElement = getPreviouslyFocusedElement(element)
fireEvent.pointerDown(element, init)
Expand Down

0 comments on commit a758238

Please sign in to comment.