刚了解了单元测试, 扫盲!
有点记不住,记录一下
Karma: 是一个执行test文件下的测试用例文件
chai: 是单元测试中写断言的函数库
sinon-chai: sinon是写一些模拟函数等,在测试中需要模拟一个函数,因为还要去断言这个函数是否被执行,所以sinon和chai合作,sinon给chai增加了函数
Sinon–Chai provides a set of custom assertions for using the Sinon.JS spy, stub, and mocking framework with the Chai assertion library. You get all the benefits of Chai with all the powerful tools of Sinon.JS.
**mocha **: 这个是 提供 test文件中的全局函数 it describe