nodejs,当文件改变时自动运行testing
有没有办法自动运行testing,当应用程序中的文件更改? 在铁路上有一个叫做守卫的gem。 如何在nodejs中实现相同的function?
尝试这个
touch / tmp / nt; 而[true]; 如果[
find . -newer /tmp/nt -type f | grep -v app/cache | wc -l
find . -newer /tmp/nt -type f | grep -v app/cache | wc -l
find . -newer /tmp/nt -type f | grep -v app/cache | wc -l
-gt 0]; 然后phpunit; touch / tmp / nt; networking连接; 睡5次; DONE
我正在使用它来自动启动phpunit。 用命令replacephpunit运行testing用sleep 1
代替sleep 5
如果你想检查每一秒(取决于你的文件的大小)
不知道这是否适用于testing,但Nodemon( https://github.com/remy/nodemon )看起来像你想要的。
安装Jasmine并运行
jasmine-node <dir> --autotest