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

atlp-rwanda / champs-ec-fe / 1e0afbcb-8064-433d-83f3-d9305c4c2224

10 Jul 2024 03:47PM UTC coverage: 85.369% (+0.2%) from 85.205%
1e0afbcb-8064-433d-83f3-d9305c4c2224

push

circleci

web-flow
Merge pull request #50 from atlp-rwanda/ft-chatboard-#187300205

feat(chatbot):add a chatbot for users interaction

226 of 310 branches covered (72.9%)

Branch coverage included in aggregate %.

93 of 99 new or added lines in 6 files covered. (93.94%)

3479 of 4030 relevant lines covered (86.33%)

2.45 hits per line

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

91.43
/src/utils/formatTime.tsx
1
import { ReactNode } from "react";
1✔
2

1✔
3
export const formatTime = (dateString: Date | ReactNode): string => {
1✔
4
  if (!(dateString instanceof Date)) {
5✔
5
    return 'NaN:NaN:NaN';
4✔
6
  }
4✔
7

1✔
8
  const date = new Date(dateString);
1✔
9
  // eslint-disable-next-line no-restricted-globals
1✔
10
  if (isNaN(date.getTime())) {
5!
NEW
11
    return 'NaN:NaN:NaN';
×
NEW
12
  }
✔
13

1✔
14
  const hours = date.getHours().toString().padStart(2, '0');
1✔
15
  const minutes = date.getMinutes().toString().padStart(2, '0');
1✔
16
  const seconds = date.getSeconds().toString().padStart(2, '0');
1✔
17
  return `${hours}:${minutes}:${seconds}`;
1✔
18
};
1✔
19

1✔
20

1✔
21

1✔
22
// import { ReactNode } from "react";
1✔
23

1✔
24
// export const formatTime=(dateString : Date | ReactNode)=> {
1✔
25
//     const date = new Date(dateString as Date);
1✔
26
//     const hours = date.getHours().toString().padStart(2, '0');
1✔
27
//     const minutes = date.getMinutes().toString().padStart(2, '0');
1✔
28
//     const seconds = date.getSeconds().toString().padStart(2, '0');
1✔
29
//     return `${hours}:${minutes}:${seconds}`;
1✔
30
//   }
1✔
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

© 2026 Coveralls, Inc