@@ -89,15 +89,30 @@ namespace ts {
89
89
"c:/dev/g.min.js/.g/g.ts"
90
90
] ) ;
91
91
92
- const defaultExcludes = [ "node_modules" , "bower_components" , "jspm_packages" ] ;
93
-
94
92
function assertParsed ( actual : ts . ParsedCommandLine , expected : ts . ParsedCommandLine ) : void {
95
93
assert . deepEqual ( actual . fileNames , expected . fileNames ) ;
96
94
assert . deepEqual ( actual . wildcardDirectories , expected . wildcardDirectories ) ;
97
95
assert . deepEqual ( actual . errors , expected . errors ) ;
98
96
}
99
97
100
98
describe ( "matchFiles" , ( ) => {
99
+ it ( "with defaults" , ( ) => {
100
+ const json = { } ;
101
+ const expected : ts . ParsedCommandLine = {
102
+ options : { } ,
103
+ errors : [ ] ,
104
+ fileNames : [
105
+ "c:/dev/a.ts" ,
106
+ "c:/dev/b.ts"
107
+ ] ,
108
+ wildcardDirectories : {
109
+ "c:/dev" : ts . WatchDirectoryFlags . Recursive
110
+ } ,
111
+ } ;
112
+ const actual = ts . parseJsonConfigFileContent ( json , caseInsensitiveCommonFoldersHost , caseInsensitiveBasePath ) ;
113
+ assertParsed ( actual , expected ) ;
114
+ } ) ;
115
+
101
116
describe ( "with literal file list" , ( ) => {
102
117
it ( "without exclusions" , ( ) => {
103
118
const json = {
@@ -192,7 +207,7 @@ namespace ts {
192
207
options : { } ,
193
208
errors : [
194
209
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
195
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
210
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
196
211
] ,
197
212
fileNames : [ ] ,
198
213
wildcardDirectories : { } ,
@@ -211,7 +226,7 @@ namespace ts {
211
226
options : { } ,
212
227
errors : [
213
228
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
214
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
229
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
215
230
] ,
216
231
fileNames : [ ] ,
217
232
wildcardDirectories : { } ,
@@ -330,7 +345,10 @@ namespace ts {
330
345
errors : [ ] ,
331
346
fileNames : [
332
347
"c:/dev/a.ts" ,
333
- "c:/dev/b.ts"
348
+ "c:/dev/b.ts" ,
349
+ "c:/dev/bower_components/a.ts" ,
350
+ "c:/dev/jspm_packages/a.ts" ,
351
+ "c:/dev/node_modules/a.ts"
334
352
] ,
335
353
wildcardDirectories : { } ,
336
354
} ;
@@ -372,8 +390,7 @@ namespace ts {
372
390
"node_modules/a.ts" ,
373
391
"bower_components/a.ts" ,
374
392
"jspm_packages/a.ts"
375
- ] ,
376
- exclude : < string [ ] > [ ]
393
+ ]
377
394
} ;
378
395
const expected : ts . ParsedCommandLine = {
379
396
options : { } ,
@@ -530,7 +547,7 @@ namespace ts {
530
547
options : { } ,
531
548
errors : [
532
549
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
533
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
550
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
534
551
] ,
535
552
fileNames : [ ] ,
536
553
wildcardDirectories : {
@@ -600,7 +617,10 @@ namespace ts {
600
617
options : { } ,
601
618
errors : [ ] ,
602
619
fileNames : [
603
- "c:/dev/a.ts"
620
+ "c:/dev/a.ts" ,
621
+ "c:/dev/bower_components/a.ts" ,
622
+ "c:/dev/jspm_packages/a.ts" ,
623
+ "c:/dev/node_modules/a.ts"
604
624
] ,
605
625
wildcardDirectories : {
606
626
"c:/dev" : ts . WatchDirectoryFlags . Recursive
@@ -671,7 +691,7 @@ namespace ts {
671
691
} ,
672
692
errors : [
673
693
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
674
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
694
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
675
695
] ,
676
696
fileNames : [ ] ,
677
697
wildcardDirectories : {
@@ -980,7 +1000,7 @@ namespace ts {
980
1000
errors : [
981
1001
ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 , "**" ) ,
982
1002
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
983
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
1003
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
984
1004
] ,
985
1005
fileNames : [ ] ,
986
1006
wildcardDirectories : { }
@@ -1022,7 +1042,7 @@ namespace ts {
1022
1042
errors : [
1023
1043
ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0 , "**/x/**/*" ) ,
1024
1044
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
1025
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
1045
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
1026
1046
] ,
1027
1047
fileNames : [ ] ,
1028
1048
wildcardDirectories : { }
@@ -1071,7 +1091,7 @@ namespace ts {
1071
1091
errors : [
1072
1092
ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 , "**/../*" ) ,
1073
1093
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
1074
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
1094
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
1075
1095
] ,
1076
1096
fileNames : [ ] ,
1077
1097
wildcardDirectories : { }
@@ -1091,7 +1111,7 @@ namespace ts {
1091
1111
errors : [
1092
1112
ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 , "**/y/../*" ) ,
1093
1113
ts . createCompilerDiagnostic ( ts . Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 ,
1094
- caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , JSON . stringify ( defaultExcludes ) )
1114
+ caseInsensitiveTsconfigPath , JSON . stringify ( json . include ) , "[]" )
1095
1115
] ,
1096
1116
fileNames : [ ] ,
1097
1117
wildcardDirectories : { }
0 commit comments