Setup munit with swf

Hi here,

In my unit test a have to instanciate a MovieClip, I’am using the swf lib. I target html5

The problem when I run the test, it can’t found the ressource of the MovieClip, the preloader is not executed so no ressource are load. Then I try to load it in my test but I fail on it.

If someone can help me to properly load my swf ressource in my unit test it would be nice !

Here my test config

version=2.1.2
src=test
bin=bin
report=report
hxml=test.hxml
classPaths=src
ressources=assets/swf/
## JavaScript
-main TestMain
-lib munit
-lib hamcrest
-lib openfl
-lib actuate
-lib lime
-lib swf
-cp src

-D html5

-cp test
-js bin/js_test.js

Thanks ! :slight_smile:

1 Like

OpenFL uses munit for testing, I think we have to trick munit into still letting us use openfl build to generate the application. Check out the “tests” directory under https://github.com/openfl/openfl for ideas :slight_smile: