MTo*_*oma 10 mocha.js node.js nodemon
使用package.json中的行为Windows 10上的nodejs项目运行测试:
"test": "nodemon --exec 'mocha -R min'"
Run Code Online (Sandbox Code Playgroud)
我明白了:
> nodemon --exec 'mocha -R min'
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `'mocha -R min'`
''mocha' is not recognized as an internal or external command,
operable program or batch file.
[nodemon] app crashed - waiting for file changes before starting...
rs
[nodemon] starting `'mocha -R min'`
''mocha' is not recognized as an internal or external command,
operable program or batch file.
[nodemon] app crashed - waiting for file changes before starting...
Run Code Online (Sandbox Code Playgroud)
MTo*_*oma 31
这行很好用:
"test": "nodemon --exec \"mocha -R min\""
Run Code Online (Sandbox Code Playgroud)
在package.json中
小智 5
如果您使用的是 Windows 操作系统,请不要使用单引号
"test": "nodemon --exec 'mocha -R min'"
用这个
"test": "nodemon --exec mocha -R min"
| 归档时间: |
|
| 查看次数: |
10886 次 |
| 最近记录: |