@@ -205,7 +205,8 @@ describe('run', () => {
205
205
recursive : false ,
206
206
root : '' ,
207
207
sources : {
208
- caseInsensitive : false
208
+ caseInsensitive : false ,
209
+ dot : false
209
210
} ,
210
211
token : {
211
212
pattern : rt . TokenPatterns . Default ,
@@ -247,7 +248,7 @@ describe('run', () => {
247
248
248
249
expect ( debugSpy ) . toHaveBeenCalledWith (
249
250
expect . stringMatching (
250
- / \[ \{ " e v e n t T y p e " : " T o k e n s R e p l a c e d " , " a p p l i c a t i o n " : " r e p l a c e t o k e n s - a c t i o n " , " v e r s i o n " : " 1 \. \d + \. \d + " , " a c c o u n t " : " c 0 5 4 b f 9 f 6 1 2 7 d c 3 5 2 a 1 8 4 a 2 9 4 0 3 a c 9 1 1 4 f 6 c 2 a 8 e 2 7 c b 4 6 7 1 9 7 c d f c 1 c 3 d f 1 1 9 e 4 " , " p i p e l i n e " : " 5 9 8 3 0 e b c 3 a 4 1 8 4 1 1 0 5 6 6 b f 1 a 2 9 0 d 0 8 4 7 3 d f d c b d 4 9 2 c e 4 9 8 b 1 4 c d 1 a 5 e 2 f a 2 e 4 4 1 " , " h o s t " : " s e r v e r " , " o s " : " W i n d o w s " , " s o u r c e s " : 3 , " a d d - b o m " : f a l s e , " c a s e - i n s e n s i t i v e - p a t h s " : f a l s e , " c h a r s - t o - e s c a p e " : " " , " e n c o d i n g " : " a u t o " , " e s c a p e " : " a u t o " , " e s c a p e - c h a r " : " " , " i f - n o - f i l e s - f o u n d " : " i g n o r e " , " l o g - l e v e l " : " i n f o " , " m i s s i n g - v a r - a c t i o n " : " n o n e " , " m i s s i n g - v a r - d e f a u l t " : " " , " m i s s i n g - v a r - l o g " : " w a r n " , " r e c u s r i v e " : f a l s e , " s e p a r a t o r " : " \. " , " t o k e n - p a t t e r n " : " d e f a u l t " , " t o k e n - p r e f i x " : " " , " t o k e n - s u f f i x " : " " , " t r a n s f o r m s " : f a l s e , " t r a n s f o r m s - p r e f i x " : " \( " , " t r a n s f o r m s - s u f f i x " : " \) " , " v a r i a b l e - f i l e s " : 0 , " v a r i a b l e - e n v s " : 0 , " i n l i n e - v a r i a b l e s " : 0 , " o u t p u t - d e f a u l t s " : 1 , " o u t p u t - f i l e s " : 2 , " o u t p u t - r e p l a c e d " : 3 , " o u t p u t - t o k e n s " : 4 , " o u t p u t - t r a n s f o r m s " : 5 , " r e s u l t " : " s u c c e s s " , " d u r a t i o n " : \d + (?: \. \d + ) ? } ] /
251
+ / \[ \{ " e v e n t T y p e " : " T o k e n s R e p l a c e d " , " a p p l i c a t i o n " : " r e p l a c e t o k e n s - a c t i o n " , " v e r s i o n " : " 1 \. \d + \. \d + " , " a c c o u n t " : " c 0 5 4 b f 9 f 6 1 2 7 d c 3 5 2 a 1 8 4 a 2 9 4 0 3 a c 9 1 1 4 f 6 c 2 a 8 e 2 7 c b 4 6 7 1 9 7 c d f c 1 c 3 d f 1 1 9 e 4 " , " p i p e l i n e " : " 5 9 8 3 0 e b c 3 a 4 1 8 4 1 1 0 5 6 6 b f 1 a 2 9 0 d 0 8 4 7 3 d f d c b d 4 9 2 c e 4 9 8 b 1 4 c d 1 a 5 e 2 f a 2 e 4 4 1 " , " h o s t " : " s e r v e r " , " o s " : " W i n d o w s " , " s o u r c e s " : 3 , " a d d - b o m " : f a l s e , " c a s e - i n s e n s i t i v e - p a t h s " : f a l s e , " c h a r s - t o - e s c a p e " : " " , " e n c o d i n g " : " a u t o " , " e s c a p e " : " a u t o " , " e s c a p e - c h a r " : " " , " i f - n o - f i l e s - f o u n d " : " i g n o r e " , " i n c l u d e - d o t - p a t h s " : f a l s e , " l o g - l e v e l " : " i n f o " , " m i s s i n g - v a r - a c t i o n " : " n o n e " , " m i s s i n g - v a r - d e f a u l t " : " " , " m i s s i n g - v a r - l o g " : " w a r n " , " r e c u s r i v e " : f a l s e , " s e p a r a t o r " : " \. " , " t o k e n - p a t t e r n " : " d e f a u l t " , " t o k e n - p r e f i x " : " " , " t o k e n - s u f f i x " : " " , " t r a n s f o r m s " : f a l s e , " t r a n s f o r m s - p r e f i x " : " \( " , " t r a n s f o r m s - s u f f i x " : " \) " , " v a r i a b l e - f i l e s " : 0 , " v a r i a b l e - e n v s " : 0 , " i n l i n e - v a r i a b l e s " : 0 , " o u t p u t - d e f a u l t s " : 1 , " o u t p u t - f i l e s " : 2 , " o u t p u t - r e p l a c e d " : 3 , " o u t p u t - t o k e n s " : 4 , " o u t p u t - t r a n s f o r m s " : 5 , " r e s u l t " : " s u c c e s s " , " d u r a t i o n " : \d + (?: \. \d + ) ? } ] /
251
252
)
252
253
) ;
253
254
} ) ;
@@ -324,7 +325,8 @@ describe('run', () => {
324
325
separator : rt . Defaults . Separator ,
325
326
normalizeWin32 : true ,
326
327
root : '' ,
327
- caseInsensitive : false
328
+ caseInsensitive : false ,
329
+ dot : false
328
330
} ) ;
329
331
330
332
expect ( replaceTokenSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , expect . any ( Function ) , expect . anything ( ) ) ;
@@ -352,7 +354,8 @@ describe('run', () => {
352
354
separator : rt . Defaults . Separator ,
353
355
normalizeWin32 : true ,
354
356
root : '' ,
355
- caseInsensitive : false
357
+ caseInsensitive : false ,
358
+ dot : false
356
359
} ) ;
357
360
358
361
expect ( replaceTokenSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , expect . any ( Function ) , expect . anything ( ) ) ;
@@ -380,7 +383,8 @@ describe('run', () => {
380
383
separator : rt . Defaults . Separator ,
381
384
normalizeWin32 : true ,
382
385
root : '' ,
383
- caseInsensitive : false
386
+ caseInsensitive : false ,
387
+ dot : false
384
388
} ) ;
385
389
386
390
expect ( replaceTokenSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , expect . any ( Function ) , expect . anything ( ) ) ;
@@ -414,7 +418,8 @@ describe('run', () => {
414
418
separator : rt . Defaults . Separator ,
415
419
normalizeWin32 : true ,
416
420
root : '' ,
417
- caseInsensitive : false
421
+ caseInsensitive : false ,
422
+ dot : false
418
423
} ) ;
419
424
420
425
expect ( replaceTokenSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , expect . any ( Function ) , expect . anything ( ) ) ;
@@ -452,7 +457,8 @@ describe('run', () => {
452
457
separator : rt . Defaults . Separator ,
453
458
normalizeWin32 : true ,
454
459
root : '' ,
455
- caseInsensitive : false
460
+ caseInsensitive : false ,
461
+ dot : false
456
462
}
457
463
) ;
458
464
@@ -486,7 +492,8 @@ describe('run', () => {
486
492
separator : rt . Defaults . Separator ,
487
493
normalizeWin32 : true ,
488
494
root : '' ,
489
- caseInsensitive : false
495
+ caseInsensitive : false ,
496
+ dot : false
490
497
} ) ;
491
498
492
499
expect ( replaceTokenSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , expect . any ( Function ) , expect . anything ( ) ) ;
@@ -650,6 +657,41 @@ describe('run', () => {
650
657
) ;
651
658
} ) ;
652
659
660
+ it ( 'include-dot-paths' , async ( ) => {
661
+ // arrange
662
+ getBooleanInputSpy . mockImplementation ( name => {
663
+ switch ( name ) {
664
+ case 'include-dot-paths' :
665
+ return true ;
666
+ default :
667
+ return false ;
668
+ }
669
+ } ) ;
670
+
671
+ getInputSpy . mockImplementation ( name => {
672
+ switch ( name ) {
673
+ case 'variables' :
674
+ return '{}' ;
675
+ default :
676
+ return '' ;
677
+ }
678
+ } ) ;
679
+
680
+ // act
681
+ await run ( ) ;
682
+
683
+ // assert
684
+ expect ( setFailedSpy ) . not . toHaveBeenCalled ( ) ;
685
+
686
+ expect ( loadVariablesSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , expect . objectContaining ( { dot : true } ) ) ;
687
+
688
+ expect ( replaceTokenSpy ) . toHaveBeenCalledWith (
689
+ expect . anything ( ) ,
690
+ expect . any ( Function ) ,
691
+ expect . objectContaining ( { sources : expect . objectContaining ( { dot : true } ) } )
692
+ ) ;
693
+ } ) ;
694
+
653
695
it ( 'log-level: debug' , async ( ) => {
654
696
// arrange
655
697
getInputSpy . mockImplementation ( name => {
@@ -993,12 +1035,7 @@ describe('run', () => {
993
1035
// assert
994
1036
expect ( setFailedSpy ) . not . toHaveBeenCalled ( ) ;
995
1037
996
- expect ( loadVariablesSpy ) . toHaveBeenCalledWith ( [ '{}' ] , {
997
- separator : ':' ,
998
- normalizeWin32 : true ,
999
- root : '' ,
1000
- caseInsensitive : false
1001
- } ) ;
1038
+ expect ( loadVariablesSpy ) . toHaveBeenCalledWith ( [ '{}' ] , expect . objectContaining ( { separator : ':' } ) ) ;
1002
1039
1003
1040
expect ( replaceTokenSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , expect . any ( Function ) , expect . anything ( ) ) ;
1004
1041
} ) ;
0 commit comments