前端技术之JavaScript-Test-断言库

1次阅读

共计 546 个字符,预计需要花费 2 分钟才能阅读完成。

expect
声称可以写更好的断言。
https://github.com/mjackson/e…

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

SuperTest
可以通过 superagent 更容易地写 HTTP 断言.
https://github.com/visionmedi…

should.js
Node.js 的 BDD 样式的断言库。
https://github.com/shouldjs/s…

commonjs-assert
JavaScript 的简易断言库。
https://github.com/browserify…

jShould
为 QUnit 而设计的一个简单断言库。
https://github.com/eliperelma…

expectThat
CoffeeScript 语言的单元测试与断言库。
https://github.com/dmohl/expe…

assert.js
https://github.com/Jxck/assert
已停止维护,建议使用 http://browserify.org/

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

正文完
 0