Skip to content

Commit 890a7a7

Browse files
test: ignore some coverages
1 parent 21909fc commit 890a7a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/TooltipController/TooltipController.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,12 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
194194
if (styleInjectionRef.current === disableStyleInjection) {
195195
return
196196
}
197+
/* c8 ignore start */
197198
if (process.env.NODE_ENV !== 'production') {
198199
// eslint-disable-next-line no-console
199200
console.warn('[react-tooltip] Do not change `disableStyleInjection` dynamically.')
200201
}
202+
/* c8 ignore end */
201203
}, [disableStyleInjection])
202204

203205
useEffect(() => {
@@ -227,10 +229,12 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
227229
elementRefs.add({ current: anchor })
228230
})
229231
} catch {
232+
/* c8 ignore start */
230233
if (!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') {
231234
// eslint-disable-next-line no-console
232235
console.warn(`[react-tooltip] "${selector}" is not a valid CSS selector`)
233236
}
237+
/* c8 ignore end */
234238
}
235239
}
236240

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

283287
useEffect(() => {
288+
/* c8 ignore start */
284289
if (process.env.NODE_ENV === 'production') {
285290
return
286291
}
292+
/* c8 ignore end */
287293
if (style?.border) {
288294
// eslint-disable-next-line no-console
289295
console.warn('[react-tooltip] Do not set `style.border`. Use `border` prop instead.')

0 commit comments

Comments
 (0)