@@ -9,7 +9,7 @@ interface ITestSetup {
99 validatedWith : {
1010 called : boolean ;
1111 allowUnknown ?: boolean ;
12- commandLineSchemas ?: readonly object [ ] ;
12+ commandLineGroups ?: readonly object [ ] ;
1313 } ;
1414}
1515
@@ -18,7 +18,7 @@ function createTestInjector(command: ICommand): ITestSetup {
1818 const validatedWith : {
1919 called : boolean ;
2020 allowUnknown ?: boolean ;
21- commandLineSchemas ?: readonly object [ ] ;
21+ commandLineGroups ?: readonly object [ ] ;
2222 } = {
2323 called : false ,
2424 } ;
@@ -37,11 +37,11 @@ function createTestInjector(command: ICommand): ITestSetup {
3737 validateOptions : (
3838 dashedOptions : any ,
3939 allowUnknown ?: boolean ,
40- commandLineSchemas ?: readonly object [ ] ,
40+ commandLineGroups ?: readonly object [ ] ,
4141 ) : void => {
4242 validatedWith . called = true ;
4343 validatedWith . allowUnknown = allowUnknown ;
44- validatedWith . commandLineSchemas = commandLineSchemas ;
44+ validatedWith . commandLineGroups = commandLineGroups ;
4545 } ,
4646 } ) ;
4747 injector . register ( "staticConfig" , { } ) ;
@@ -92,9 +92,9 @@ function createDispatchInjector(command: ICommand): {
9292 validateOptions (
9393 dashedOptions : any ,
9494 allowUnknown ?: boolean ,
95- commandLineSchemas ?: readonly object [ ] ,
95+ commandLineGroups ?: readonly object [ ] ,
9696 ) : void {
97- record . commandLineParses += commandLineSchemas ? 1 : 0 ;
97+ record . commandLineParses += commandLineGroups ? 1 : 0 ;
9898 record . primedWith . push ( { dashedOptions, allowUnknown } ) ;
9999 // The real parser merges the command's declarations into the shared
100100 // table and re-parses, replacing both.
@@ -193,20 +193,20 @@ describe("commands-service", () => {
193193 await ( < any > service ) . tryExecuteCommandAction ( "info" , [ ] ) ;
194194
195195 assert . isTrue ( validatedWith . called ) ;
196- assert . deepEqual ( validatedWith . commandLineSchemas , [ ] ) ;
196+ assert . deepEqual ( validatedWith . commandLineGroups , [ ] ) ;
197197 } ) ;
198198
199199 it ( "passes the option groups the typed command lists" , async ( ) => {
200- const schema = { } ;
200+ const group = { } ;
201201 const { injector, validatedWith } = createTestInjector ( {
202202 ...baseCommand ,
203- optionGroupSchemas : [ schema ] ,
203+ optionGroups : [ group ] ,
204204 } ) ;
205205 const commandsService : any = injector . resolve ( CommandsService ) ;
206206
207207 await commandsService . tryExecuteCommandAction ( "command" , [ ] ) ;
208208
209- assert . strictEqual ( validatedWith . commandLineSchemas [ 0 ] , schema ) ;
209+ assert . strictEqual ( validatedWith . commandLineGroups [ 0 ] , group ) ;
210210 } ) ;
211211
212212 it ( "tolerates unknown options for a command that forwards them" , async ( ) => {
0 commit comments