File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ describe('Database', () => {
16
16
expect ( apiClass . help ( ) . shellApiType ( ) ) . to . equal ( 'Help' ) ;
17
17
expect ( apiClass . help . shellApiType ( ) ) . to . equal ( 'Help' ) ;
18
18
} ) ;
19
+ it ( 'calls help function for methods' , ( ) => {
20
+ expect ( apiClass . runCommand . help ( ) . shellApiType ( ) ) . to . equal ( 'Help' ) ;
21
+ expect ( apiClass . runCommand . help . shellApiType ( ) ) . to . equal ( 'Help' ) ;
22
+ } ) ;
19
23
} ) ;
20
24
describe ( 'collections' , ( ) => {
21
25
it ( 'allows to get a collection as property if is not one of the existing methods' , ( ) => {
Original file line number Diff line number Diff line change @@ -81,13 +81,16 @@ export function shellApiClassDefault(constructor: Function): void {
81
81
} ;
82
82
83
83
const attributeHelpKeyPrefix = `${ classHelpKeyPrefix } .attributes.${ propertyName } ` ;
84
- descriptor . value . help = {
84
+ const attrHelp = {
85
85
help : `${ attributeHelpKeyPrefix } .example` ,
86
86
docs : `${ attributeHelpKeyPrefix } .link` ,
87
87
attr : [
88
88
{ description : `${ attributeHelpKeyPrefix } .description` }
89
89
]
90
90
} ;
91
+ const aHelp = new Help ( attrHelp ) ;
92
+ descriptor . value . help = ( ) : Help => ( aHelp ) ;
93
+ Object . setPrototypeOf ( descriptor . value . help , aHelp ) ;
91
94
92
95
classHelp . attr . push ( {
93
96
name : propertyName ,
You can’t perform that action at this time.
0 commit comments