@@ -18,8 +18,9 @@ const { buildProject, cleanProject, watchProject } = require("./scripts/build/pr
18
18
const cmdLineOptions = require ( "./scripts/build/options" ) ;
19
19
20
20
const copyright = "CopyrightNotice.txt" ;
21
- const testRoot = "built/local/testRunner/Harness.js" ;
22
- //!!! const testRoot = "built/local/run.js";
21
+ const testRootFile = "built/local/testRunner/Harness.js" ;
22
+ const testRootBundle = "built/local/run.js" ;
23
+ const testRoot = testRootBundle ; // use testRootFile to run directly from the module files
23
24
const cleanTasks = [ ] ;
24
25
25
26
const buildScripts = ( ) => buildProject ( "scripts" ) ;
@@ -322,7 +323,14 @@ task("watch-lssl").flags = {
322
323
" --built" : "Compile using the built version of the compiler."
323
324
} ;
324
325
325
- const buildTests = ( ) => buildProject ( "src/testRunner" ) ;
326
+ const buildTests = series (
327
+ ( ) => buildProject ( "src/testRunner" ) ,
328
+ ( ) => exec ( "npx" , [
329
+ "esbuild" , "--bundle" , "--format=cjs" , "--platform=node" , "--target=node12" ,
330
+ "--legal-comments=none" ,
331
+ `--outfile=${ testRootBundle } ` , testRootFile ,
332
+ ] ) ,
333
+ ) ;
326
334
task ( "tests" , series ( preBuild , parallel ( buildLssl , buildTests ) ) ) ;
327
335
task ( "tests" ) . description = "Builds the test infrastructure" ;
328
336
task ( "tests" ) . flags = {
0 commit comments