Skip to content

Commit

Permalink
test: ignore some coverages
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Feb 18, 2024
1 parent 21909fc commit 890a7a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/TooltipController/TooltipController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,12 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
if (styleInjectionRef.current === disableStyleInjection) {
return
}
/* c8 ignore start */
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn('[react-tooltip] Do not change `disableStyleInjection` dynamically.')
}
/* c8 ignore end */
}, [disableStyleInjection])

useEffect(() => {
Expand Down Expand Up @@ -227,10 +229,12 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
elementRefs.add({ current: anchor })
})
} catch {
/* c8 ignore start */
if (!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn(`[react-tooltip] "${selector}" is not a valid CSS selector`)
}
/* c8 ignore end */
}
}

Expand Down Expand Up @@ -281,9 +285,11 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
}, [anchorRefs, providerActiveAnchor, activeAnchor, anchorId, anchorSelect])

useEffect(() => {
/* c8 ignore start */
if (process.env.NODE_ENV === 'production') {
return
}
/* c8 ignore end */
if (style?.border) {
// eslint-disable-next-line no-console
console.warn('[react-tooltip] Do not set `style.border`. Use `border` prop instead.')
Expand Down

0 comments on commit 890a7a7

Please sign in to comment.