context.log(message[, data])


  • message <string> 要报告的信息。
  • data <any> 可选的结构化负载附加到消息中。测试运行器会原封不动地传递它。

写一个日志消息到输出。生成的 'test:log' 事件会立即发出,按照测试执行的顺序。

🌐 Write a log message to the output. The resulting 'test:log' event is emitted immediately, in the order that the tests execute.

test.describe('my suite', (suite) => {
  suite.log('Suite log message');
});