• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SAP / ui5-webcomponents-react / 6548509533

17 Oct 2023 02:15PM CUT coverage: 87.659% (-0.03%) from 87.692%
6548509533

Pull #5155

github

web-flow
Merge 117438009 into d428739c1
Pull Request #5155: fix(deps): update dependency recharts to v2.9.0

2782 of 3733 branches covered (0.0%)

1 of 1 new or added line in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

5086 of 5802 relevant lines covered (87.66%)

65351.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.62
/packages/charts/src/hooks/useCancelAnimationFallback.ts
1
import { debounce } from '@ui5/webcomponents-react-base';
2
import { useRef, useState } from 'react';
3

4
export const useCancelAnimationFallback = (
28✔
5
  noAnimation: boolean
6
): { isMounted: boolean; handleBarAnimationStart: () => void; handleBarAnimationEnd: () => void } => {
7
  const [isMounted, setIsMounted] = useState(true);
28✔
8
  const cancelAnimationFallback = () => {
28✔
UNCOV
9
    setIsMounted(false);
×
UNCOV
10
    setIsMounted(true);
×
11
  };
12
  const debouncedCancelAnimationFallback = useRef(debounce(cancelAnimationFallback, 1500)).current;
28✔
13

14
  const handleBarAnimationStart = () => {
28✔
15
    if (!noAnimation) {
54✔
16
      debouncedCancelAnimationFallback();
54✔
17
    }
18
  };
19
  const handleBarAnimationEnd = () => {
28✔
20
    if (!noAnimation) {
60✔
21
      debouncedCancelAnimationFallback.cancel();
60✔
22
    }
23
  };
24
  return { isMounted, handleBarAnimationStart, handleBarAnimationEnd };
28✔
25
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc