Im searching for a decent test runner and unit testing framework for Javascript. My candidates are Karma and Mocha. Previously I used JsTestDriver, where adding HTML fixtures was easy, but I cant find a way how to load HTML fragments and access it from Mocha tests using Karma testrunner
Im searching for a decent test runner and unit testing framework for Javascript. My candidates are Karma and Mocha. Previously I used JsTestDriver, where adding HTML fixtures was easy, but I cant find a way how to load HTML fragments and access it from Mocha tests using Karma testrunner
Share Improve this question asked Jun 21, 2013 at 11:36 SoniCoderSoniCoder 4,1643 gold badges37 silver badges44 bronze badges2 Answers
Reset to default 3I have a demo that uses html fixtures with jasmine here and the demo description contains links to a screencast and github repo for running with Karma. See this link.
The final solution was Karma testrunner bined with RequireJS, which has a text plugin making the loading of HTML fixtures really easy. A working example can be seen at this Minesweeper game. It's still in development phase, but the the libraries and structuring are working.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745468538a4629024.html
评论列表(0条)