Im looking for a suitable test platform and unit testing system for Javascript. My candidates are Karma and Mocha. I used to use JsTestDriver, where adding HTML tools was easy, but I canβt find a way to load HTML fragments and access them from Mocha tests using Karma testrunner
The final solution was Karma testrunner combined with RequireJS , which has a text plugin which makes loading HTML documents very easy. A working example can be seen in this sapper game . It is still under development, but libraries and structuring work.
I have a demo version that uses html devices with jasmine here, and the demo description contains links to screencast and github repo for working with karma. See this link .