I am trying the new Haxe Test Explorer for VSC and so far it looks pretty cool! Being able to quickly iterate on tests inside the editing environment makes Test Driven Development so much closer. Very good job guys
What I am experiencing though is that you cannot access the js namespace as the tests are running in eval. On the documentation page it says: âCurrently only works for Node.js and sys targetsâ. How can one use this Node.js target as I assume this would allow me to use the js namespace, right?
When running tests through test explorer, it literally calls haxe test.hxml -lib test-adapter (unless you changed it via haxeTestExplorer.testCommand setting).
If test.hxml builds a Node.js target (or any other target), you have to make sure that someone actually runs node with your output file (or executes your C++ binary or .jar file, etc.). So you will have to add some -cmd node test.js call to your test.hxml, to make it run your tests directly after compiling.