Skip to content

Commit 5279a88

Browse files
vsemozhetbytBethGriggs
authored andcommitted
doc: fix nits in writing-tests.md
* Correct a typo. * Normalize spaces. * Split a paragraph with different topics. PR-URL: #26543 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 11d163b commit 5279a88

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

doc/guides/writing-tests.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -285,19 +285,21 @@ assert.throws(
285285

286286
Output written by tests to stdout or stderr, such as with `console.log()` or
287287
`console.error()`, can be useful when writing tests, as well as for debugging
288-
them during later maintenance. The output will be supressed by the test runner
288+
them during later maintenance. The output will be suppressed by the test runner
289289
(`./tools/test.py`) unless the test fails, but will always be displayed when
290290
running tests directly with `node`. For failing tests, the test runner will
291291
include the output along with the failed test assertion in the test report.
292292

293293
Some output can help debugging by giving context to test failures. For example,
294294
when troubleshooting tests that timeout in CI. With no log statements, we have
295-
no idea where the test got hung up. There have been cases where tests fail
296-
without `console.log()`, and then pass when its added, so be cautious about its
297-
use, particularly in tests of the I/O and streaming APIs.
295+
no idea where the test got hung up.
296+
297+
There have been cases where tests fail without `console.log()`, and then pass
298+
when its added, so be cautious about its use, particularly in tests of the I/O
299+
and streaming APIs.
298300

299301
Excessive use of console output is discouraged as it can overwhelm the display,
300-
including the Jenkins console and test report displays. Be particularly
302+
including the Jenkins console and test report displays. Be particularly
301303
cautious of output in loops, or other contexts where output may be repeated many
302304
times in the case of failure.
303305

0 commit comments

Comments
 (0)