nodejs渐入佳境[33]-mocha测试与自动测试
mocha
1 |
> npm init |
package.json
1 |
{ |
测试文件
1 |
|
测试
1 |
> npm test |
返回:
1 |
> mocha **/*.test.js |
修改并测试
1 |
|
返回:
1 |
> testapplication@1.0.0 test /Users/jackson/Desktop/testApplication |
自动测试
1 |
> npm install --save-dev nodemon |
添加到脚本中
package.json:
1 |
{ |
执行:
1 |
>npm run test-watch |
本文链接: https://dreamerjonson.com/2018/12/01/node-33-test-app/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY 4.0 CN协议 许可协议。转载请注明出处!