I’m trying to integrate wakanda unit tests into our development workflow, but don’t really know where to start.
My favour would be if I could run unit tests somehow like “npm run test” (as i do for my frontend code) and start the unit tests with my npm script … this way, the tests could easily be executed.
Unfortunately, I have two problems with this:
- Can’t get wakanda to execute my file wakanda-unit-tests.js with relative file paths
- If a test fails, wakanda does not throw any exit code that my build would not fail -> how can I generate an exit code for example as described in this article http://doc.wakanda.org/home2.en.html#/Wakanda/0.v5/run.301-1019704.en.html ->
run()
returns the total number of failures, suitable for use as a process exit status code.
Any suggestions are very much appreciated :-)