Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtGokhan committed Jan 7, 2024
1 parent fd390a8 commit 749e467
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export function createTrackingWrapper(defaultProps: TrackingProps = {}) {

return (
<Tracking {...props}>
<TrackingHandler onHandle={spy}>{children}</TrackingHandler>
{ctx =>
<TrackingHandler onHandle={spy}>{typeof children === 'function' ? children(ctx) : children}</TrackingHandler>
}
</Tracking>
);
};
Expand Down

0 comments on commit 749e467

Please sign in to comment.