@@ -2244,12 +2244,7 @@ describe('<command module auto-discovery>', () => {
22442244
22452245 expect ( logSpy . mock . calls [ 0 ] ) . toStrictEqual ( [
22462246 expect . stringMatching (
2247- expectedCommandsRegex (
2248- [ 'n' ] ,
2249- 'nsf' ,
2250- 'Root program.+\\s+\\[default]\\s+\\[deprecated]' ,
2251- 'Parent program.+\\s+\\[deprecated]'
2252- )
2247+ expectedCommandsRegex ( [ 'n' ] , 'nsf' , 'Parent program.+\\s+\\[deprecated]' )
22532248 )
22542249 ] ) ;
22552250
@@ -2258,7 +2253,6 @@ describe('<command module auto-discovery>', () => {
22582253 expectedCommandsRegex (
22592254 [ [ 'f' , 'Child program.+\\s+\\[deprecated]' ] , 's' , 't' ] ,
22602255 'nsf n' ,
2261- 'Parent program.+\\s+\\[default]\\s+\\[deprecated]' ,
22622256 'Child program.+\\s+\\[(?!deprecated)[^\\n]*]'
22632257 )
22642258 )
@@ -2278,10 +2272,6 @@ describe('<command module auto-discovery>', () => {
22782272
22792273 expect ( errorSpy ) . not . toHaveBeenCalled ( ) ;
22802274
2281- expect ( logSpy . mock . calls ) . toStrictEqual ( [
2282- [ expect . stringContaining ( '[deprecated: this is a deprecation message!]' ) ]
2283- ] ) ;
2284-
22852275 expect ( logSpy . mock . calls ) . toStrictEqual ( [
22862276 [ expect . stringContaining ( '[deprecated: deprecation message 2]' ) ]
22872277 ] ) ;
@@ -2303,13 +2293,11 @@ describe('<command module auto-discovery>', () => {
23032293 expect ( bf_util . isNullArguments ( parentResult ) ) . toBeTrue ( ) ;
23042294
23052295 expect ( logSpy . mock . calls [ 0 ] ) . toStrictEqual ( [
2306- expect . stringMatching ( expectedCommandsRegex ( [ 'n' ] , 'nsf' , 'Root' , ' Parent') )
2296+ expect . stringMatching ( expectedCommandsRegex ( [ 'n' ] , 'nsf' , 'Parent' ) )
23072297 ] ) ;
23082298
23092299 expect ( logSpy . mock . calls [ 1 ] ) . toStrictEqual ( [
2310- expect . stringMatching (
2311- expectedCommandsRegex ( [ 'f' , 's' , 't' ] , 'nsf n' , 'Parent' , 'Child' )
2312- )
2300+ expect . stringMatching ( expectedCommandsRegex ( [ 'f' , 's' , 't' ] , 'nsf n' , 'Child' ) )
23132301 ] ) ;
23142302 } ) ;
23152303 } ) ;
@@ -2331,15 +2319,11 @@ describe('<command module auto-discovery>', () => {
23312319 expect ( bf_util . isNullArguments ( childResult ) ) . toBeTrue ( ) ;
23322320
23332321 expect ( logSpy . mock . calls [ 0 ] ) . toStrictEqual ( [
2334- expect . stringMatching (
2335- / C o m m a n d s : \n \s + t e s t \s + \[ d e f a u l t ] \n \s + t e s t n e s t e d \n \n O p t i o n s : /
2336- )
2322+ expect . stringMatching ( / C o m m a n d s : \n \s + t e s t n e s t e d \n \n O p t i o n s : / )
23372323 ] ) ;
23382324
23392325 expect ( logSpy . mock . calls [ 1 ] ) . toStrictEqual ( [
2340- expect . stringMatching (
2341- / C o m m a n d s : \n \s + t e s t n e s t e d \s + \[ d e f a u l t ] \n \s + t e s t n e s t e d c h i l d \n \n O p t i o n s : /
2342- )
2326+ expect . stringMatching ( / C o m m a n d s : \n \s + t e s t n e s t e d c h i l d \n \n O p t i o n s : / )
23432327 ] ) ;
23442328
23452329 expect ( logSpy . mock . calls [ 2 ] ) . toStrictEqual ( [
@@ -2466,7 +2450,6 @@ describe('<command module auto-discovery>', () => {
24662450 expectedCommandsRegex (
24672451 [ 's-p-a-c-e-d-name' , 'spaced-name' ] ,
24682452 'badly-named-package' ,
2469- '' ,
24702453 ''
24712454 )
24722455 )
@@ -2476,7 +2459,6 @@ describe('<command module auto-discovery>', () => {
24762459 expectedCommandsRegex (
24772460 [ 'bad-ly-name-d' ] ,
24782461 'badly-named-package spaced-name' ,
2479- '' ,
24802462 ''
24812463 )
24822464 )
@@ -2842,12 +2824,12 @@ describe('<command module auto-discovery>', () => {
28422824 expect ( logSpy . mock . calls ) . toStrictEqual ( [
28432825 [
28442826 expect . stringMatching (
2845- / C o m m a n d s : \n \s + n s f \s + R o o t p r o g r a m d e s c r i p t i o n t e x t \s + \[ d e f a u l t ] \[ d e p r e c a t e d ] \n \s + n s f n \s + P a r e n t p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : p a r e n t , p ] \[ d e p r e c a t e d ] \n \n O p t i o n s : /
2827+ / C o m m a n d s : \n \s + n s f n \s + P a r e n t p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : p a r e n t , p ] \[ d e p r e c a t e d ] \n \n O p t i o n s : /
28462828 )
28472829 ] ,
28482830 [
28492831 expect . stringMatching (
2850- / C o m m a n d s : \n \s + n s f n \s + P a r e n t p r o g r a m d e s c r i p t i o n t e x t \s + \[ d e f a u l t ] \[ d e p r e c a t e d ] \n \s + n s f n f \s + C h i l d p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : c h i l d - 1 ] \[ d e p r e c a t e d ] \n \s + n s f n s \s + C h i l d p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : c h i l d - 2 ] \n \s + n s f n t \s + C h i l d p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : c h i l d - 3 ] \n \n O p t i o n s : /
2832+ / C o m m a n d s : \n \s + n s f n f \s + C h i l d p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : c h i l d - 1 ] \[ d e p r e c a t e d ] \n \s + n s f n s \s + C h i l d p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : c h i l d - 2 ] \n \s + n s f n t \s + C h i l d p r o g r a m d e s c r i p t i o n t e x t \s + \[ a l i a s e s : c h i l d - 3 ] \n \n O p t i o n s : /
28512833 )
28522834 ] ,
28532835 [ expect . not . stringContaining ( 'Commands:' ) ]
@@ -3154,7 +3136,7 @@ describe('<command module auto-discovery>', () => {
31543136 await bf . runProgram ( getFixturePath ( 'nested-same-names' ) , '--help' ) ;
31553137
31563138 expect ( logSpy . mock . calls ) . toStrictEqual ( [
3157- [ expect . stringMatching ( expectedCommandsRegex ( [ 'conflict' ] , 'conflict' , '' , '' ) ) ]
3139+ [ expect . stringMatching ( expectedCommandsRegex ( [ 'conflict' ] , 'conflict' , '' ) ) ]
31583140 ] ) ;
31593141 } ) ;
31603142 } ) ;
@@ -3274,7 +3256,6 @@ describe('<command module auto-discovery>', () => {
32743256 [ 'no-conflict' , '\\[aliases: alias3]' ]
32753257 ] ,
32763258 'name' ,
3277- '' ,
32783259 ''
32793260 )
32803261 )
@@ -3292,12 +3273,7 @@ describe('<command module auto-discovery>', () => {
32923273 expect ( logSpy . mock . calls ) . toStrictEqual ( [
32933274 [
32943275 expect . stringMatching (
3295- expectedCommandsRegex (
3296- [ 'five' , 'four' , 'one' , 'three' , 'two' ] ,
3297- 'alpha' ,
3298- '' ,
3299- ''
3300- )
3276+ expectedCommandsRegex ( [ 'five' , 'four' , 'one' , 'three' , 'two' ] , 'alpha' , '' )
33013277 )
33023278 ]
33033279 ] ) ;
0 commit comments