Skip to content

Commit

Permalink
Support watch mode when working on Main JavaScript tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelMaxime committed Nov 5, 2023
1 parent f606dc0 commit a7e4547
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Fable.Build/Test/JavaScript.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ let private mainTestSourceDir = Path.Resolve("tests", "Js", "Main")
let private mainTestProject =
Path.Resolve("tests", "Js", "Main", "Fable.Tests.fsproj")

let private mochaCommand = "npx mocha . --reporter dot -t 10000"

let private testReact (isWatch: bool) =
let workingDirectoy = Path.Resolve("tests", "React")

Expand Down Expand Up @@ -52,6 +50,15 @@ let private handleMainTests (isWatch: bool) (noDotnet: bool) =
let destinationDir =
Path.Resolve("temp", "tests", "JavaScript", folderName)

let mochaCommand =
CmdLine.empty
|> CmdLine.appendRaw "npx"
|> CmdLine.appendRaw "mocha"
|> CmdLine.appendRaw destinationDir
|> CmdLine.appendPrefix "--reporter" "dot"
|> CmdLine.appendPrefix "-t" "10000"
|> CmdLine.toString

Directory.clean destinationDir

let fableArgs =
Expand Down

0 comments on commit a7e4547

Please sign in to comment.