diff --git a/doc/api/test.md b/doc/api/test.md index 7513dc24e26afd..52620899191142 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -357,6 +357,12 @@ 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. +```js +test('top level test', (t) => { + t.diagnostic('A diagnostic message'); +}); +``` + ### `context.runOnly(shouldRunOnlyTests)`