| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 411f3e0 commit 8e88a18
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -330,6 +330,11 @@ changes: | |||
| 330 | 330 | Asserts that the function `block` does not throw an error. See | |
| 331 | 331 | [`assert.throws()`][] for more details. | |
| 332 | 332 | ||
| 333 | + Please note: Using `assert.doesNotThrow()` is actually not useful because there | ||
| 334 | + is no benefit by catching an error and then rethrowing it. Instead, consider | ||
| 335 | + adding a comment next to the specific code path that should not throw and keep | ||
| 336 | + error messages as expressive as possible. | ||
| 337 | + | ||
| 333 | 338 | When `assert.doesNotThrow()` is called, it will immediately call the `block` | |
| 334 | 339 | function. | |
| 335 | 340 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments