File tree Expand file tree Collapse file tree
__tests__/commands/capabilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @smartthings/cli " : patch
3+ ---
4+
5+ Correct the capability presentation help examples to use the registered command name.
Original file line number Diff line number Diff line change @@ -86,7 +86,26 @@ test('builder', () => {
8686 expect ( capabilityIdOrIndexBuilderMock ) . toHaveBeenCalledExactlyOnceWith ( apiOrganizationCommandBuilderArgvMock )
8787 expect ( formatAndWriteItemBuilderMock ) . toHaveBeenCalledExactlyOnceWith ( capabilityIdOrIndexBuilderArgvMock )
8888
89- expect ( exampleMock ) . toHaveBeenCalledTimes ( 1 )
89+ expect ( exampleMock ) . toHaveBeenCalledExactlyOnceWith ( [
90+ [
91+ '$0 capabilities:presentation' ,
92+ 'prompt for a capability and display its presentation information' ,
93+ ] ,
94+ [
95+ '$0 capabilities:presentation --namespace cathappy12345' ,
96+ 'prompt for a capability from the specified namespace and display its' +
97+ ' presentation information' ,
98+ ] ,
99+ [
100+ '$0 capabilities:presentation cathappy12345.myCapability' ,
101+ 'display details for a capability by id' ,
102+ ] ,
103+ [
104+ '$0 capabilities:presentation 1' ,
105+ 'display presentation information for the first capability in the list retrieved' +
106+ ' by running "smartthings capabilities"' ,
107+ ] ,
108+ ] )
90109 expect ( optionMock ) . toHaveBeenCalledTimes ( 1 )
91110 expect ( buildEpilogMock ) . toHaveBeenCalledTimes ( 1 )
92111 expect ( epilogMock ) . toHaveBeenCalledTimes ( 1 )
Original file line number Diff line number Diff line change @@ -40,20 +40,20 @@ export const builder = (yargs: Argv): Argv<CommandArgs> =>
4040 } )
4141 . example ( [
4242 [
43- '$0 capabilities:presentations ' ,
43+ '$0 capabilities:presentation ' ,
4444 'prompt for a capability and display its presentation information' ,
4545 ] ,
4646 [
47- '$0 capabilities:presentations --namespace cathappy12345' ,
47+ '$0 capabilities:presentation --namespace cathappy12345' ,
4848 'prompt for a capability from the specified namespace and display its' +
4949 ' presentation information' ,
5050 ] ,
5151 [
52- '$0 capabilities:presentations cathappy12345.myCapability' ,
52+ '$0 capabilities:presentation cathappy12345.myCapability' ,
5353 'display details for a capability by id' ,
5454 ] ,
5555 [
56- '$0 capabilities:presentations 1' ,
56+ '$0 capabilities:presentation 1' ,
5757 'display presentation information for the first capability in the list retrieved' +
5858 ' by running "smartthings capabilities"' ,
5959 ] ,
You can’t perform that action at this time.
0 commit comments