Skip to content
Philippe edited this page Sep 23, 2015 · 3 revisions

IntelliJ

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.

  1. Select Run -> Edit Configurations

  2. Select + and choose Haxe Application

  3. Give it a name like Test JS and select the module it's to run in.

  4. Expand the Before Launch section and remove Make from the list via the - button.

    screen shot 2014-11-17 at 9 14 38 am

  5. Select the + button and choose Run External Tool.

  6. In the External Tools window select the + button.

  7. 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.

    screen shot 2014-11-17 at 9 27 38 am

  8. You can add entries here for each test target

    screen shot 2014-11-17 at 9 37 53 am

  9. Choose the entry you want to execute (e.g. test js) and select OK

  10. Your Run Configuration should now look something like this

    screen shot 2014-11-17 at 9 38 03 am

  11. Select Apply and close the window.

  12. Finally select the new run configuration and run it.

    screen shot 2014-11-17 at 9 38 19 am

FlashDevelop

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.