What are some JavaScript Unit Testing and Mocking

2019-01-29 22:10发布

My main JavaScript framework is jQuery so I would like my unit test and mocking frameworks to be compatible with that. I'd rather not have to introduce another JavaScript framework.

I am currently using QUnit for unit testing and Jack for mocking, but I am pretty new to the whole unit testing of JavaScript.

Does anyone else have a better tool to suggest? What has worked for you?

14条回答
Animai°情兽
2楼-- · 2019-01-29 22:45

For mozilla development, I fall in love with UXU, based on MozUnit but still active. Has nice features like mock server or sleep / yeld methods.

查看更多
forever°为你锁心
3楼-- · 2019-01-29 22:47

This is a pretty good review of mocking frameworks available for Javascript:

http://testdrivenwebsites.com/2010/05/06/java-script-mock-frameworks-comparison

查看更多
登录 后发表回答