7

在Node.js上用什么测试框架好?

 2 years ago
source link: https://www.zhihu.com/question/20075367
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

在Node.js上用什么测试框架好?

Node.js在Test Module上列的测试框架也不少,请问大家有推荐的吗?
132
28,795

13 个回答

mocha + should + istanbul + supertest

欢迎来 cnode 讨论:

CNode:Node.js专业中文社区
小伙子学什么的?计算机。哟,学电脑的!

mocha + chai + sinon

我一般用 tape,非常简单,单个运行直接 node test/xxx.js

ci 里运行 给 package.json 设置 tape test/*.js 就行

ci 只要知道 exit 不正常就行了,不用搞得那么复杂

a mere mortal.

死马推荐的mocha + should.js基本够用,如果需要同时测试很多异步操作的话:

会比较好些。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK