NODE_V8_COVERAGE=dir


当设置时,Node.js 将开始将 V8 JavaScript 代码覆盖源映射数据输出到作为参数提供的目录(覆盖信息以 JSON 格式写入带有 coverage 前缀的文件)。

NODE_V8_COVERAGE 将自动传播到子进程,从而更容易检测调用 child_process.spawn() 系列函数的应用程序。 NODE_V8_COVERAGE 可以设置为空字符串,防止传播。

When set, Node.js will begin outputting V8 JavaScript code coverage and Source Map data to the directory provided as an argument (coverage information is written as JSON to files with a coverage prefix).

NODE_V8_COVERAGE will automatically propagate to subprocesses, making it easier to instrument applications that call the child_process.spawn() family of functions. NODE_V8_COVERAGE can be set to an empty string, to prevent propagation.