在Windows上使用主pipe重新运行摩卡

我正尝试使用主pipe重新运行摩卡testing。 我努力了:

supervisor node_modules\.bin\mocha 

它进入循环与错误:

 basedir=`dirname "$0"` 

build议?

我想所有你想要做的是mocha -w

 -w, --watch watch files for changes 

它与点阵记者(默认)和-G很好地-G ,当你的testing失败的时候给你吼叫通知。

编辑:

我发现你提到的与Windows有关的问题: 当试图让摩卡看我的项目时,“没有这样的模块”的错误

我也无法帮助。

但回到supervisor问题:当我安装摩卡时,“bin”脚本在node_modules / mocha / bin中,我可以通过以下方法重复运行testing

 supervisor node_modules/mocha/bin/mocha 

主pipe确实在每次testing运行之间都会打印一些令人讨厌的DEBUG行,但是可以用--quiet静音。 因为摩卡在每次运行之后都会退出,所以你有一个不断的testing循环。