@@ -89,15 +89,30 @@ namespace ts {
8989 "c:/dev/g.min.js/.g/g.ts"
9090 ] ) ;
9191
92- const defaultExcludes = [ "node_modules" , "bower_components" , "jspm_packages" ] ;
93-
9492 function assertParsed ( actual : ts . ParsedCommandLine , expected : ts . ParsedCommandLine ) : void {
9593 assert . deepEqual ( actual . fileNames , expected . fileNames ) ;
9694 assert . deepEqual ( actual . wildcardDirectories , expected . wildcardDirectories ) ;
9795 assert . deepEqual ( actual . errors , expected . errors ) ;
9896 }
9997
10098 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+
101116 describe ( "with literal file list" , ( ) => {
102117 it ( "without exclusions" , ( ) => {
103118 const json = {
@@ -192,7 +207,7 @@ namespace ts {
192207 options : { } ,
193208 errors : [
194209 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 ) , "[]" )
196211 ] ,
197212 fileNames : [ ] ,
198213 wildcardDirectories : { } ,
@@ -211,7 +226,7 @@ namespace ts {
211226 options : { } ,
212227 errors : [
213228 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 ) , "[]" )
215230 ] ,
216231 fileNames : [ ] ,
217232 wildcardDirectories : { } ,
@@ -330,7 +345,10 @@ namespace ts {
330345 errors : [ ] ,
331346 fileNames : [
332347 "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"
334352 ] ,
335353 wildcardDirectories : { } ,
336354 } ;
@@ -372,8 +390,7 @@ namespace ts {
372390 "node_modules/a.ts" ,
373391 "bower_components/a.ts" ,
374392 "jspm_packages/a.ts"
375- ] ,
376- exclude : < string [ ] > [ ]
393+ ]
377394 } ;
378395 const expected : ts . ParsedCommandLine = {
379396 options : { } ,
@@ -530,7 +547,7 @@ namespace ts {
530547 options : { } ,
531548 errors : [
532549 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 ) , "[]" )
534551 ] ,
535552 fileNames : [ ] ,
536553 wildcardDirectories : {
@@ -600,7 +617,10 @@ namespace ts {
600617 options : { } ,
601618 errors : [ ] ,
602619 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"
604624 ] ,
605625 wildcardDirectories : {
606626 "c:/dev" : ts . WatchDirectoryFlags . Recursive
@@ -671,7 +691,7 @@ namespace ts {
671691 } ,
672692 errors : [
673693 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 ) , "[]" )
675695 ] ,
676696 fileNames : [ ] ,
677697 wildcardDirectories : {
@@ -980,7 +1000,7 @@ namespace ts {
9801000 errors : [
9811001 ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 , "**" ) ,
9821002 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 ) , "[]" )
9841004 ] ,
9851005 fileNames : [ ] ,
9861006 wildcardDirectories : { }
@@ -1022,7 +1042,7 @@ namespace ts {
10221042 errors : [
10231043 ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0 , "**/x/**/*" ) ,
10241044 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 ) , "[]" )
10261046 ] ,
10271047 fileNames : [ ] ,
10281048 wildcardDirectories : { }
@@ -1071,7 +1091,7 @@ namespace ts {
10711091 errors : [
10721092 ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 , "**/../*" ) ,
10731093 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 ) , "[]" )
10751095 ] ,
10761096 fileNames : [ ] ,
10771097 wildcardDirectories : { }
@@ -1091,7 +1111,7 @@ namespace ts {
10911111 errors : [
10921112 ts . createCompilerDiagnostic ( ts . Diagnostics . File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 , "**/y/../*" ) ,
10931113 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 ) , "[]" )
10951115 ] ,
10961116 fileNames : [ ] ,
10971117 wildcardDirectories : { }
0 commit comments