javascript单元测试

参考资料:

http://www.ruanyifeng.com/blog/2015/12/a-mocha-tutorial-of-examples.html

https://www.cnblogs.com/fundebug/p/6594147.html

http://blog.csdn.net/u012510478/article/details/54728921?utm_source=itdadao&utm_medium=referral

https://www.cnblogs.com/tugenhua0707/p/8419534.html

关于Mocha测试中遇到的问题/要点及引申:

1.Cannot find module 'chai': npm install --save-dev chai

2.mocha自动识别项目下 test文件夹内的 *.test.js

3.mocha --compilers js:babel-core/register 后 DeprecationWarning 忽略

4.在 ./test/mocha.opts 配置中建议取消 --growl 版本bug

5.单元测试脚本推荐写出该单元所有可能情况

6.可使用 mochawesome 模块生成好看的html报告,引申:

  表现形式?

  单元测试及系统测试区分?

  项目中如何批量自动化?