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

infernojs / inferno / #8072

26 Nov 2024 08:43PM UTC coverage: 92.865%. First build
#8072

travis-ci

1846 of 2117 branches covered (87.2%)

4061 of 4373 relevant lines covered (92.87%)

4141.52 hits per line

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

81.82
/packages/inferno-redux/src/connect/verifySubselectors.ts
1
import { warning } from '../utils/warning';
2

5✔
3
export const verify = (selector, methodName: string, displayName: string) => {
4
  if (!selector) {
5✔
5
    throw new Error(`Unexpected value for ${methodName} in ${displayName}.`);
207!
6
  }
×
7

8
  if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
9
    // eslint-disable-next-line no-prototype-builtins
207✔
10
    if (!selector.hasOwnProperty('dependsOnOwnProps')) {
11
      warning(
138!
12
        `The selector for ${methodName} of ${displayName} did not specify a value for dependsOnOwnProps.`,
×
13
      );
14
    }
15
  }
16
};
17

18
export const verifySubselectors = (
19
  mapStateToProps,
69✔
20
  mapDispatchToProps,
21
  mergeProps,
22
  displayName,
23
) => {
24
  verify(mapStateToProps, 'mapStateToProps', displayName);
25
  verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
69✔
26
  verify(mergeProps, 'mergeProps', displayName);
69✔
27
};
69✔
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