我有带有 watcher 和nodemon的grunt-nodeunit任务。因此,当我对文件进行任何更改时,grunt-nodeunit和nodemon开始同时工作。当grunt-nodeunit执行测试时 nodemon重新启动服务器。所以我得到了一些虚假的失败测试。服务器重启后如何运行测试?
我的咕噜声配置:
grunt.initConfig({
nodeunit: {
all: ['./test.nodeunit/**/*.coffee']
},
watch: {
all: {
files: ['**/*.coffee', '**/*.jade'],
tasks: ['nodeunit']
}
}
});
我的 nodemon 配置在package.json
:
"start": "nodemon app.js"