前端技术之:JavaScript Test 断言库

expect

声称可以写更好的断言。

https://github.com/mjackson/expect


chai

可以写BDD样式的断言,也可以写TDD样式的断言,可用于Node.js与浏览器端,可以与任何测试框架集成。

https://github.com/chaijs/chai


SuperTest

可以通过 superagent 更容易地写HTTP断言.

https://github.com/visionmedia/supertest


should.js

Node.js的BDD样式的断言库。

https://github.com/shouldjs/should.js


commonjs-assert

JavaScript的简易断言库。

https://github.com/browserify/commonjs-assert


jShould

为QUnit而设计的一个简单断言库。

https://github.com/eliperelman/jShould


expectThat

CoffeeScript语言的单元测试与断言库。

https://github.com/dmohl/expectThat


assert.js

https://github.com/Jxck/assert

已停止维护,建议使用 http://browserify.org/


这些断言库中,作者更喜欢使用expect与chai。