Watch mode


稳定性: 1 - 实验

Node.js 测试运行器支持通过传递 --watch 标志以监视模式运行:

node --test --watch

在监视模式下,测试运行器将监视测试文件及其依赖项的更改。 当检测到变化时,测试运行器将重新运行受变化影响的测试。 测试运行器将继续运行直到进程终止。

Stability: 1 - Experimental

The Node.js test runner supports running in watch mode by passing the --watch flag:

node --test --watch

In watch mode, the test runner will watch for changes to test files and their dependencies. When a change is detected, the test runner will rerun the tests affected by the change. The test runner will continue to run until the process is terminated.