| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1d4fd21 commit 693505b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -285,19 +285,21 @@ assert.throws( | |||
| 285 | 285 | ||
| 286 | 286 | Output written by tests to stdout or stderr, such as with `console.log()` or | |
| 287 | 287 | `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 | ||
| 289 | 289 | (`./tools/test.py`) unless the test fails, but will always be displayed when | |
| 290 | 290 | running tests directly with `node`. For failing tests, the test runner will | |
| 291 | 291 | include the output along with the failed test assertion in the test report. | |
| 292 | 292 | ||
| 293 | 293 | Some output can help debugging by giving context to test failures. For example, | |
| 294 | 294 | 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. | ||
| 298 | 300 | ||
| 299 | 301 | 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 | ||
| 301 | 303 | cautious of output in loops, or other contexts where output may be repeated many | |
| 302 | 304 | times in the case of failure. | |
| 303 | 305 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments