事件:'test:summary'
🌐 Event: 'test:summary'
data<Object>counts<Object> 一个包含各种测试结果计数的对象。duration_ms<number> 测试运行的持续时间(毫秒)。file<string> | <undefined> 生成摘要的测试文件的路径。如果摘要对应多个文件,则该值为undefined。success<boolean> 指示测试运行是否被认为成功。如果发生任何错误情况,例如测试失败或覆盖率未达到阈值,此值将被设置为false。
在测试运行完成时触发。当测试运行完成时,该事件包含相关的指标,对于判断测试运行是通过还是失败非常有用。如果使用进程级测试隔离,则每个测试文件都会生成一个 'test:summary' 事件,此外还会生成最终的累计汇总。
🌐 Emitted when a test run completes. This event contains metrics pertaining to
the completed test run, and is useful for determining if a test run passed or
failed. If process-level test isolation is used, a 'test:summary' event is
generated for each test file in addition to a final cumulative summary.