@@ -52,13 +52,12 @@ let private testAdaptive (isWatch: bool) =
5252
5353 let destinationDir = Path.Resolve( " temp" , " tests" , " JavaScript" , folderName)
5454
55- let mochaCommand =
55+ let testCommand =
5656 CmdLine.empty
57- |> CmdLine.appendRaw " npx"
58- |> CmdLine.appendRaw " mocha"
59- |> CmdLine.appendRaw destinationDir
60- |> CmdLine.appendPrefix " --reporter" " dot"
61- |> CmdLine.appendPrefix " -t" " 10000"
57+ |> CmdLine.appendRaw " node"
58+ |> CmdLine.appendPrefix " --test-reporter" " spec"
59+ |> CmdLine.appendPrefix " --test-timeout" " 10000"
60+ |> CmdLine.appendPrefix " --test" ( destinationDir </> " Main.js" )
6261 |> CmdLine.toString
6362
6463 Directory.clean destinationDir
@@ -77,9 +76,9 @@ let private testAdaptive (isWatch: bool) =
7776 CmdLine.empty
7877 |> CmdLine.appendRaw " --watch"
7978 |> CmdLine.appendRaw " --runWatch"
80- |> CmdLine.appendRaw mochaCommand
79+ |> CmdLine.appendRaw testCommand
8180 else
82- CmdLine.empty |> CmdLine.appendRaw " --run" |> CmdLine.appendRaw mochaCommand
81+ CmdLine.empty |> CmdLine.appendRaw " --run" |> CmdLine.appendRaw testCommand
8382 ]
8483
8584 if isWatch then
@@ -93,13 +92,12 @@ let private handleMainTests (isWatch: bool) (noDotnet: bool) =
9392
9493 let destinationDir = Path.Resolve( " temp" , " tests" , " JavaScript" , folderName)
9594
96- let mochaCommand =
95+ let testCommand =
9796 CmdLine.empty
98- |> CmdLine.appendRaw " npx"
99- |> CmdLine.appendRaw " mocha"
100- |> CmdLine.appendRaw destinationDir
101- |> CmdLine.appendPrefix " --reporter" " dot"
102- |> CmdLine.appendPrefix " -t" " 10000"
97+ |> CmdLine.appendRaw " node"
98+ |> CmdLine.appendPrefix " --test-reporter" " spec"
99+ |> CmdLine.appendPrefix " --test-timeout" " 10000"
100+ |> CmdLine.appendPrefix " --test" ( destinationDir </> " Main.js" )
103101 |> CmdLine.toString
104102
105103 Directory.clean destinationDir
@@ -118,9 +116,9 @@ let private handleMainTests (isWatch: bool) (noDotnet: bool) =
118116 CmdLine.empty
119117 |> CmdLine.appendRaw " --watch"
120118 |> CmdLine.appendRaw " --runWatch"
121- |> CmdLine.appendRaw mochaCommand
119+ |> CmdLine.appendRaw testCommand
122120 else
123- CmdLine.empty |> CmdLine.appendRaw " --run" |> CmdLine.appendRaw mochaCommand
121+ CmdLine.empty |> CmdLine.appendRaw " --run" |> CmdLine.appendRaw testCommand
124122 ]
125123
126124 if isWatch then
0 commit comments