-
Notifications
You must be signed in to change notification settings - Fork 56
IDE Integration
While direct integration is planned, for now you can run munit via a run configuration which launches an external tool. Here's how.
First, it's assumed you have a Haxe project open in IntelliJ which has already been configured for munit.
-
Select
Run -> Edit Configurations
-
Select
+
and chooseHaxe Application
-
Give it a name like
Test JS
and select the module it's to run in. -
Expand the
Before Launch
section and removeMake
from the list via the-
button. -
Select the
+
button and chooseRun External Tool
. -
In the External Tools window select the
+
button. -
Fill in the Edit Tool window as shown below, making sure to insert the path to your haxelib executable and which target(s) you want to test in the Parameters. Also ensure to select/call the group
munit
. -
You can add entries here for each test target
-
Choose the entry you want to execute (e.g.
test js
) and select OK -
Your Run Configuration should now look something like this
-
Select
Apply
and close the window. -
Finally select the new run configuration and run it.
You can run munit as a pre/post build or run command:
cmd /c haxelib run munit test
It is possible to view the test results inside FlashDevelop:
cmd /c haxelib run munit test -browser flashdevelop
Note that by default the embedded browser may behave like IE8 so you'll want to force IE to be the latest version.