--experimental-test-coverage


node:test 模块结合使用时,会生成代码覆盖率报告作为测试运行器输出的一部分。 如果没有运行测试,则不会生成覆盖率报告。 请参阅有关 从测试中收集代码覆盖率 的文档以获取更多详细信息。

When used in conjunction with the node:test module, a code coverage report is generated as part of the test runner output. If no tests are run, a coverage report is not generated. See the documentation on collecting code coverage from tests for more details.