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

snatalenko / node-cqrs / 10223294719

02 Aug 2024 11:27PM UTC coverage: 93.793% (-2.9%) from 96.655%
10223294719

push

github

snatalenko
1.0.0-rc.0

548 of 852 branches covered (64.32%)

2327 of 2481 relevant lines covered (93.79%)

21.55 hits per line

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

85.0
/src/utils/getHandledMessageTypes.ts
1
import { getMessageHandlerNames } from './getMessageHandlerNames';
4✔
2

4✔
3
/**
4✔
4
 * Get a list of message types handled by observer
4✔
5
 */
4✔
6
export function getHandledMessageTypes(
16✔
7
        observerInstanceOrClass: (object | Function) & { handles?: string[] }
16✔
8
): string[] {
16✔
9
        if (!observerInstanceOrClass)
16✔
10
                throw new TypeError('observerInstanceOrClass argument required');
16!
11

16✔
12
        if (observerInstanceOrClass.handles)
16✔
13
                return observerInstanceOrClass.handles;
16✔
14

4✔
15
        const prototype = Object.getPrototypeOf(observerInstanceOrClass);
4✔
16
        if (prototype && prototype.constructor && prototype.constructor.handles)
16✔
17
                return prototype.constructor.handles;
16✔
18

×
19
        return getMessageHandlerNames(observerInstanceOrClass);
×
20
}
×
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