@@ -19,6 +19,8 @@ const cmdLineOptions = require("./scripts/build/options");
1919const copyright = "CopyrightNotice.txt" ;
2020const cleanTasks = [ ] ;
2121
22+ const testRunner = "./built/local/testRunner/_namespaces/Harness.js" ;
23+
2224const buildScripts = ( ) => buildProject ( "scripts" ) ;
2325task ( "scripts" , buildScripts ) ;
2426task ( "scripts" ) . description = "Builds files in the 'scripts' folder." ;
@@ -119,6 +121,12 @@ const localPreBuild = parallel(generateLibs, series(buildScripts, generateDiagno
119121const preBuild = cmdLineOptions . lkg ? lkgPreBuild : localPreBuild ;
120122
121123const buildServices = ( ( ) => {
124+ // TODO(jakebailey): fix this for modules
125+ return cb => {
126+ console . log ( "!!!TODO!!! buildServices" ) ;
127+ cb ( ) ;
128+ } ;
129+
122130 // build typescriptServices.out.js
123131 const buildTypescriptServicesOut = ( ) => buildProject ( "src/typescriptServices/tsconfig.json" , cmdLineOptions ) ;
124132
@@ -252,6 +260,12 @@ task("watch-min").flags = {
252260} ;
253261
254262const buildLssl = ( ( ) => {
263+ // TODO(jakebailey): fix this for modules
264+ return cb => {
265+ console . log ( "!!!TODO!!! buildLssl" ) ;
266+ cb ( ) ;
267+ } ;
268+
255269 // build tsserverlibrary.out.js
256270 const buildServerLibraryOut = ( ) => buildProject ( "src/tsserverlibrary/tsconfig.json" , cmdLineOptions ) ;
257271
@@ -429,8 +443,8 @@ preTest.displayName = "preTest";
429443
430444const postTest = ( done ) => cmdLineOptions . lint ? lint ( ) : done ( ) ;
431445
432- const runTests = ( ) => runConsoleTests ( "built/local/run.js" , "mocha-fivemat-progress-reporter" , /*runInParallel*/ false , /*watchMode*/ false ) ;
433- task ( "runtests" , series ( preBuild , preTest , runTests , postTest ) ) ;
446+ const runTests = ( ) => runConsoleTests ( testRunner , "mocha-fivemat-progress-reporter" , /*runInParallel*/ false , /*watchMode*/ false ) ;
447+ task ( "runtests" , series ( /* preBuild, preTest,*/ runTests /* , postTest*/ ) ) ; // TODO(jakebailey): fix this for modules
434448task ( "runtests" ) . description = "Runs the tests using the built run.js file." ;
435449task ( "runtests" ) . flags = {
436450 "-t --tests=<regex>" : "Pattern for tests to run." ,
@@ -449,8 +463,8 @@ task("runtests").flags = {
449463 " --shardId" : "1-based ID of this shard (default: 1)" ,
450464} ;
451465
452- const runTestsParallel = ( ) => runConsoleTests ( "built/local/run.js" , "min" , /*runInParallel*/ cmdLineOptions . workers > 1 , /*watchMode*/ false ) ;
453- task ( "runtests-parallel" , series ( preBuild , preTest , runTestsParallel , postTest ) ) ;
466+ const runTestsParallel = ( ) => runConsoleTests ( testRunner , "min" , /*runInParallel*/ cmdLineOptions . workers > 1 , /*watchMode*/ false ) ;
467+ task ( "runtests-parallel" , series ( /* preBuild, preTest,*/ runTestsParallel /* , postTest*/ ) ) ; // TODO(jakebailey): fix this for modules
454468task ( "runtests-parallel" ) . description = "Runs all the tests in parallel using the built run.js file." ;
455469task ( "runtests-parallel" ) . flags = {
456470 " --no-lint" : "disables lint." ,
@@ -599,10 +613,10 @@ task("publish-nightly").description = "Runs `npm publish --tag next` to create a
599613// write some kind of trigger file that indicates build completion that we could listen for instead.
600614const watchRuntests = ( ) => watch ( [ "built/local/*.js" , "tests/cases/**/*.ts" , "tests/cases/**/tsconfig.json" ] , { delay : 5000 } , async ( ) => {
601615 if ( cmdLineOptions . tests || cmdLineOptions . failed ) {
602- await runConsoleTests ( "built/local/run.js" , "mocha-fivemat-progress-reporter" , /*runInParallel*/ false , /*watchMode*/ true ) ;
616+ await runConsoleTests ( testRunner , "mocha-fivemat-progress-reporter" , /*runInParallel*/ false , /*watchMode*/ true ) ;
603617 }
604618 else {
605- await runConsoleTests ( "built/local/run.js" , "min" , /*runInParallel*/ true , /*watchMode*/ true ) ;
619+ await runConsoleTests ( testRunner , "min" , /*runInParallel*/ true , /*watchMode*/ true ) ;
606620 }
607621} ) ;
608622task ( "watch" , series ( preBuild , preTest , parallel ( watchLib , watchDiagnostics , watchServices , watchLssl , watchTests , watchRuntests ) ) ) ;
0 commit comments