1.mocha karma 阮一峰http://www.ruanyifeng.com/blog/2015/12/a-mocha-tutorial-of-examples.html
github参考资料:
参考iview 以及 element-ui的test文件夹的测试文件的写法;
didi/cube-ui的比较详细
vue的test包含unit test和e2e test
element-ui input的测试:https://github.com/ElemeFE/element/blob/dev/test/unit/specs/input.spec.js
2.sinon 文章https://www.zcfy.cc/article/sinon-tutorial-javascript-testing-with-mocks-spies-stubs-422.html
官方文档:http://sinonjs.org/releases/v2.0.0/spies/
3.单元测试的意义:http://taobaofed.org/blog/2015/12/10/nodejs-unit-tests/
网友评论