admin管理员组文章数量:1426480
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.
本文标签: How can I load HTML fixtures for Javascript unit tests in Karma with MochaStack Overflow
版权声明:本文标题:How can I load HTML fixtures for Javascript unit tests in Karma with Mocha? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745468537a2659640.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论