mocha 有测试实时模式吗?

Pab*_*iel 3 mocha.js

I am doing TDD with mocha and chai to test some NodeJS scripts, and I have to run "mocha" every time that I want to run the test again.

Is there a way to setup mocha and chai to run the test just after I save the source file? like an option "mocha -–live-reload" (that is just an example...)

Mat*_*aly 7

根据文档, --watch 标志应该这样做。