@@ -436,7 +436,6 @@ namespace ts {
436
436
changeCompilerVersion ( host ) ;
437
437
builder . buildAllProjects ( ) ;
438
438
host . assertDiagnosticMessages (
439
- // TODO:: This should build all instead
440
439
getExpectedDiagnosticForProjectsInBuild ( relSources [ project . first ] [ source . config ] , relSources [ project . second ] [ source . config ] , relSources [ project . third ] [ source . config ] ) ,
441
440
[ 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 ] ,
442
441
[ Diagnostics . Building_project_0 , sources [ project . first ] [ source . config ] ] ,
@@ -843,5 +842,47 @@ ${internal} enum internalEnum { a, b, c }`);
843
842
} ) ;
844
843
} ) ;
845
844
} ) ;
845
+
846
+ it ( "non module projects without prepend" , ( ) => {
847
+ const fs = outFileFs . shadow ( ) ;
848
+ // No prepend
849
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `{ "path": "../first", "prepend": true }` , `{ "path": "../first" }` ) ;
850
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `{ "path": "../second", "prepend": true }` , `{ "path": "../second" }` ) ;
851
+
852
+ // Non Modules
853
+ replaceText ( fs , sources [ project . first ] [ source . config ] , `"composite": true,` , `"composite": true, "module": "none",` ) ;
854
+ replaceText ( fs , sources [ project . second ] [ source . config ] , `"composite": true,` , `"composite": true, "module": "none",` ) ;
855
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `"composite": true,` , `"composite": true, "module": "none",` ) ;
856
+
857
+ // Own file emit
858
+ replaceText ( fs , sources [ project . first ] [ source . config ] , `"outFile": "./bin/first-output.js",` , "" ) ;
859
+ replaceText ( fs , sources [ project . second ] [ source . config ] , `"outFile": "../2/second-output.js",` , "" ) ;
860
+ replaceText ( fs , sources [ project . third ] [ source . config ] , `"outFile": "./thirdjs/output/third-output.js",` , "" ) ;
861
+
862
+ const host = new fakes . SolutionBuilderHost ( fs ) ;
863
+ const builder = createSolutionBuilder ( host ) ;
864
+ builder . buildAllProjects ( ) ;
865
+ host . assertDiagnosticMessages (
866
+ getExpectedDiagnosticForProjectsInBuild ( relSources [ project . first ] [ source . config ] , relSources [ project . second ] [ source . config ] , relSources [ project . third ] [ source . config ] ) ,
867
+ [ Diagnostics . Project_0_is_out_of_date_because_output_file_1_does_not_exist , relSources [ project . first ] [ source . config ] , "src/first/first_PART1.js" ] ,
868
+ [ Diagnostics . Building_project_0 , sources [ project . first ] [ source . config ] ] ,
869
+ [ Diagnostics . Project_0_is_out_of_date_because_output_file_1_does_not_exist , relSources [ project . second ] [ source . config ] , "src/second/second_part1.js" ] ,
870
+ [ Diagnostics . Building_project_0 , sources [ project . second ] [ source . config ] ] ,
871
+ [ Diagnostics . Project_0_is_out_of_date_because_output_file_1_does_not_exist , relSources [ project . third ] [ source . config ] , "src/third/third_part1.js" ] ,
872
+ [ Diagnostics . Building_project_0 , sources [ project . third ] [ source . config ] ]
873
+ ) ;
874
+ const expectedOutputFiles = flatMap ( sources , ( [ config , ts ] ) => [
875
+ removeFileExtension ( config ) + Extension . TsBuildInfo ,
876
+ ...flatMap ( ts , f => [
877
+ removeFileExtension ( f ) + Extension . Js ,
878
+ removeFileExtension ( f ) + Extension . Js + ".map" ,
879
+ removeFileExtension ( f ) + Extension . Dts ,
880
+ removeFileExtension ( f ) + Extension . Dts + ".map" ,
881
+ ] )
882
+ ] ) ;
883
+ for ( const output of expectedOutputFiles ) {
884
+ assert ( fs . existsSync ( output ) , `Expect file ${ output } to exist` ) ;
885
+ }
886
+ } ) ;
846
887
} ) ;
847
888
}
0 commit comments