• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Info updated!

snatalenko / node-cqrs / 21645374105

03 Feb 2026 07:52PM UTC coverage: 84.53% (-9.9%) from 94.396%
21645374105

Pull #28

github

web-flow
Merge 2650d0e58 into 828e39903
Pull Request #28: TypeScript and event dispatching pipeline refactoring

611 of 939 branches covered (65.07%)

817 of 932 new or added lines in 65 files covered. (87.66%)

59 existing lines in 13 files now uncovered.

1213 of 1435 relevant lines covered (84.53%)

28.39 hits per line

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

88.24
/src/utils/getMessageHandlerNames.ts
1
function getInheritedPropertyNames(prototype: object): string[] {
2
        const parentPrototype = prototype && Object.getPrototypeOf(prototype);
192✔
3
        if (!parentPrototype)
192✔
4
                return [];
54✔
5

6
        const propDescriptors = Object.getOwnPropertyDescriptors(parentPrototype);
138✔
7
        const propNames = Object.keys(propDescriptors);
138✔
8

9
        return [
138✔
10
                ...propNames,
11
                ...getInheritedPropertyNames(parentPrototype)
12
        ];
13
}
14

15
/**
16
 * Get message handler names from a command/event handler class.
17
 * Assumes all private method names start from underscore ("_").
18
 */
19
export function getMessageHandlerNames(observerInstanceOrClass: (object | Function)): string[] {
40✔
20
        if (!observerInstanceOrClass)
54!
UNCOV
21
                throw new TypeError('observerInstanceOrClass argument required');
×
22

23
        const prototype = typeof observerInstanceOrClass === 'function' ?
54!
24
                observerInstanceOrClass.prototype :
25
                Object.getPrototypeOf(observerInstanceOrClass);
26

27
        if (!prototype)
54!
UNCOV
28
                throw new TypeError('prototype cannot be resolved');
×
29

30
        const inheritedProperties = getInheritedPropertyNames(prototype);
54✔
31
        const propDescriptors = Object.getOwnPropertyDescriptors(prototype);
54✔
32
        const propNames = Object.keys(propDescriptors);
54✔
33

34
        return propNames.filter(key =>
54✔
35
                !key.startsWith('_') &&
184✔
36
                !inheritedProperties.includes(key) &&
37
                typeof propDescriptors[key].value === 'function');
38
}
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