人们正在使用哪些javascript模拟框架? [英] What javascript mocking frameworks are people using?
问题描述
我正在使用Jasmine测试客户端&服务器端的javascript,需要做一些模拟.有没有人对一个好的javascript模拟框架有任何建议?
I'm using Jasmine for testing client & server side javascript and need to do some mocking. Has anyone got any suggestions for a good javascript mocking framework?
推荐答案
我尝试了一次,但是最终进行了重构,因此不需要它.它没有依赖关系,因此在node.js上应该可以正常工作. http://sinonjs.org/
I tried this once, but ended up refactoring instead so it wasn't needed. It doesn't have dependencies, so it should work just fine on node.js. http://sinonjs.org/
这些是测试框架,但其中一些内部包含模拟框架: http://zh-CN. wikipedia.org/wiki/List_of_unit_testing_frameworks#JavaScript
These are testing frameworks, but some of them include mocking frameworks internally: http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#JavaScript
这篇关于人们正在使用哪些javascript模拟框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!