context.diagnostic(message)


新增于: v16.17.0
  • message <string> 要显示为 TAP 诊断的消息。

    \message <string> Message to be displayed as a TAP diagnostic.

此函数用于将 TAP 诊断写入输出。任何诊断信息都包含在测试结果的末尾。此函数不返回值。

\This function is used to write TAP diagnostics to the output. Any diagnostic information is included at the end of the test's results. This function does not return a value.

test('top level test', (t) => {
 t.diagnostic('A diagnostic message');
}); 

AltStyle によって変換されたページ (->オリジナル) /