@@ -449,7 +449,6 @@ namespace ts {
449
449
changeCompilerVersion ( host ) ;
450
450
builder . buildAllProjects ( ) ;
451
451
host . assertDiagnosticMessages (
452
- // TODO:: This should build all instead
453
452
getExpectedDiagnosticForProjectsInBuild ( relSources [ project . first ] [ source . config ] , relSources [ project . second ] [ source . config ] , relSources [ project . third ] [ source . config ] ) ,
454
453
[ Diagnostics . Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2 , relSources [ project . first ] [ source . config ] , fakes . version , version ] ,
455
454
[ Diagnostics . Building_project_0 , sources [ project . first ] [ source . config ] ] ,
@@ -856,5 +855,47 @@ ${internal} enum internalEnum { a, b, c }`);
856
855
} ) ;
857
856
} ) ;
858
857
} ) ;
858
+
859
+ it ( "non module projects without prepend" , ( ) => {
860
+ const fs = outFileFs . shadow ( ) ;
861
+ // No prepend
862
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `{ "path": "../first", "prepend": true }` , `{ "path": "../first" }` ) ;
863
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `{ "path": "../second", "prepend": true }` , `{ "path": "../second" }` ) ;
864
+
865
+ // Non Modules
866
+ replaceText ( fs , sources [ project . first ] [ source . config ] , `"composite": true,` , `"composite": true, "module": "none",` ) ;
867
+ replaceText ( fs , sources [ project . second ] [ source . config ] , `"composite": true,` , `"composite": true, "module": "none",` ) ;
868
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `"composite": true,` , `"composite": true, "module": "none",` ) ;
869
+
870
+ // Own file emit
871
+ replaceText ( fs , sources [ project . first ] [ source . config ] , `"outFile": "./bin/first-output.js",` , "" ) ;
872
+ replaceText ( fs , sources [ project . second ] [ source . config ] , `"outFile": "../2/second-output.js",` , "" ) ;
873
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `"outFile": "./thirdjs/output/third-output.js",` , "" ) ;
874
+
875
+ const host = new fakes . SolutionBuilderHost ( fs ) ;
876
+ const builder = createSolutionBuilder ( host ) ;
877
+ builder . buildAllProjects ( ) ;
878
+ host . assertDiagnosticMessages (
879
+ getExpectedDiagnosticForProjectsInBuild ( relSources [ project . first ] [ source . config ] , relSources [ project . second ] [ source . config ] , relSources [ project . third ] [ source . config ] ) ,
880
+ [ Diagnostics . Project_0_is_out_of_date_because_output_file_1_does_not_exist , relSources [ project . first ] [ source . config ] , "src/first/first_PART1.js" ] ,
881
+ [ Diagnostics . Building_project_0 , sources [ project . first ] [ source . config ] ] ,
882
+ [ Diagnostics . Project_0_is_out_of_date_because_output_file_1_does_not_exist , relSources [ project . second ] [ source . config ] , "src/second/second_part1.js" ] ,
883
+ [ Diagnostics . Building_project_0 , sources [ project . second ] [ source . config ] ] ,
884
+ [ Diagnostics . Project_0_is_out_of_date_because_output_file_1_does_not_exist , relSources [ project . third ] [ source . config ] , "src/third/third_part1.js" ] ,
885
+ [ Diagnostics . Building_project_0 , sources [ project . third ] [ source . config ] ]
886
+ ) ;
887
+ const expectedOutputFiles = flatMap ( sources , ( [ config , ts ] ) => [
888
+ removeFileExtension ( config ) + Extension . TsBuildInfo ,
889
+ ...flatMap ( ts , f => [
890
+ removeFileExtension ( f ) + Extension . Js ,
891
+ removeFileExtension ( f ) + Extension . Js + ".map" ,
892
+ removeFileExtension ( f ) + Extension . Dts ,
893
+ removeFileExtension ( f ) + Extension . Dts + ".map" ,
894
+ ] )
895
+ ] ) ;
896
+ for ( const output of expectedOutputFiles ) {
897
+ assert ( fs . existsSync ( output ) , `Expect file ${ output } to exist` ) ;
898
+ }
899
+ } ) ;
859
900
} ) ;
860
901
}
0 commit comments