How can I load HTML fixtures for Javascript unit tests in Karma with Mocha? - Stack Overflow

Im searching for a decent test runner and unit testing framework for Javascript. My candidates are Karm

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 badges
Add a ment  | 

2 Answers 2

Reset to default 3

I 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信