How to load HTML shortcuts for Javascript unit tests in karma using Mocha?

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

+7
source share
2 answers

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.

+1
source

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 .

+3
source

All Articles