-
Notifications
You must be signed in to change notification settings - Fork 56
Home
Welcome to the MassiveUnit wiki!
Run the following commands to install munit, configure it for a project and then run some example tests for all supported platforms.
> haxelib install munit
> mkdir ExampleProject
> cd ExampleProject
> haxelib run munit config
> haxelib run munit test
And if you'd like to test just JavaScript and ActionScript 3.0
> haxelib run munit test -js -as3
A useful tip is to add an alias for munit to you terminal or cmd prompt to save you typing haxelib run munit ..
each time.
munit uses haXe metadata to execute test cases at runtime. To create a new test case, simply create an empty class and use the following metadata syntax:
@Test
public function testExample():Void
{
Assert.isTrue(true);
}
For detailed information on TestCase metadata see Working with test classes
The munit build tool makes working with unit tests easier and quicker.
To check that the tool is installed
haxelib run munit
This should display summary help information for all the commands. We recommend using the inbuilt help for detailed usage and instructions
haxelib run munit help <command>
More information