You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests, test has errors which still passes the test for some reason:
PASS src/core/Tooltip/Tooltip.test.tsx
console.error
Warning: Unknown event handler property `onToggleButtonClick`. It will be ignored.
at button
at Button (/suomifi-ui-components/src/reset/HtmlButton/HtmlButton.tsx:35:31)
at shouldForwardProp (/suomifi-ui-components/node_modules/styled-components/src/models/StyledComponent.js:253:26)
at BaseTooltipToggleButton (/suomifi-ui-components/src/core/Tooltip/TooltipToggleButton/TooltipToggleButton.tsx:21:42)
at /suomifi-ui-components/src/core/Tooltip/TooltipToggleButton/TooltipToggleButton.tsx:50:10
at shouldForwardProp (/suomifi-ui-components/node_modules/styled-components/src/models/StyledComponent.js:253:26)
at BaseTooltip (/suomifi-ui-components/src/core/Tooltip/Tooltip.tsx:63:5)
at Tooltip
96 | it('is clicked; given method called', () => {
97 | const mockClickHandler = jest.fn();
> 98 | render(
| ^
console.error
Warning: Unknown event handler property `onCloseButtonClick`. It will be ignored.
at button
at Button (/suomifi-ui-components/src/reset/HtmlButton/HtmlButton.tsx:35:31)
at shouldForwardProp (/suomifi-ui-components/node_modules/styled-components/src/models/StyledComponent.js:253:26)
at BaseTooltipToggleButton (/suomifi-ui-components/src/core/Tooltip/TooltipToggleButton/TooltipToggleButton.tsx:21:42)
at /suomifi-ui-components/src/core/Tooltip/TooltipToggleButton/TooltipToggleButton.tsx:50:10
at shouldForwardProp (/suomifi-ui-components/node_modules/styled-components/src/models/StyledComponent.js:253:26)
at BaseTooltip (/suomifi-ui-components/src/core/Tooltip/Tooltip.tsx:63:5)
at Tooltip
114 | it('is clicked; given method called', () => {
115 | const mockClickHandler = jest.fn();
> 116 | render(
| ^
Problem
When running tests, test has errors which still passes the test for some reason:
Location
Problem location:
suomifi-ui-components/src/core/Tooltip/Tooltip.tsx
Lines 147 to 174 in 24ed70c
Possible solution
Should be only passing supported props.
Maybe destructuring the
onToggleButtonClick
andonCloseButtonClick
so that they will not with thepassProps
toTooltipToggleButton
.Steps to Reproduce the Problem
Run
npm run test
and find the error from the list.Specifications
13.0.0
The text was updated successfully, but these errors were encountered: