Commit abe5d05
committed
doc: update assert's validation functions
Using `assert.throws()` or `assert.rejects()` in combination with
validation function can be very powerful. Using them by returning
any value besides `true` makes debugging very difficult though
because there's no context or reason why the error validation failed.
Thus, it is recommended to throw an error in such cases instead of
returning anything besides `true`.
PR-URL: #27781
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent f03241f commit abe5d05Copy full SHA for abe5d05
File tree
Expand file treeCollapse file tree
1 file changed
+8
-4
lines changedOpen diff view settings
Filter options
- doc/api
Expand file treeCollapse file tree
1 file changed
+8
-4
lines changedOpen diff view settings
Collapse file
+8-4Lines changed: 8 additions & 4 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1210 | 1210 | |
1211 | 1211 | |
1212 | 1212 | |
1213 | | - |
1214 | | - |
1215 | | - |
1216 | | - |
| 1213 | + |
| 1214 | + |
| 1215 | + |
| 1216 | + |
| 1217 | + |
| 1218 | + |
| 1219 | + |
| 1220 | + |
1217 | 1221 | |
1218 | 1222 | |
1219 | 1223 | |
|
0 commit comments