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

fkhadra / react-toastify / 12001201729

25 Nov 2024 12:54AM UTC coverage: 42.537% (-46.5%) from 88.998%
12001201729

Pull #1178

github

fkhadra
bump coverall action
Pull Request #1178: [WIP] V11

141 of 375 branches covered (37.6%)

Branch coverage included in aggregate %.

3 of 5 new or added lines in 3 files covered. (60.0%)

214 existing lines in 9 files now uncovered.

201 of 429 relevant lines covered (46.85%)

176.21 hits per line

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

23.33
/src/utils/propValidator.ts
1
import { isValidElement } from 'react';
2
import { Id } from '../types';
3

4
export const isNum = (v: any): v is Number =>
78✔
UNCOV
5
  typeof v === 'number' && !isNaN(v);
×
6

7
export const isStr = (v: any): v is String => typeof v === 'string';
78✔
8

9
export const isFn = (v: any): v is Function => typeof v === 'function';
5,184✔
10

11
export const isId = (v: unknown): v is Id => isStr(v) || isNum(v);
78!
12

13
export const parseClassName = (v: any) => (isStr(v) || isFn(v) ? v : null);
78!
14

15
export const getAutoCloseDelay = (
78✔
16
  toastAutoClose?: false | number,
17
  containerAutoClose?: false | number
18
) =>
UNCOV
19
  toastAutoClose === false || (isNum(toastAutoClose) && toastAutoClose > 0)
×
20
    ? toastAutoClose
21
    : containerAutoClose;
22

23
export const canBeRendered = <T>(content: T): boolean =>
78✔
UNCOV
24
  isValidElement(content) || isStr(content) || isFn(content) || isNum(content);
×
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