Commit 59a977d
assert: respect assert.doesNotThrow message.
Special handling to detect when user has supplied a custom message.
Added a test for user message.
When testing if `actual` value is an error use
`util.isError` instead of `instanceof`.
Fixes: #2385
PR-URL: #2407
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 51c0808 commit 59a977dCopy full SHA for 59a977d
File tree
Expand file treeCollapse file tree
2 files changed
+13
-1
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+13
-1
lines changedOpen diff view settings
Collapse file
+8-1Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
330 | 330 | |
331 | 331 | |
332 | 332 | |
333 | | - |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
| 339 | + |
| 340 | + |
334 | 341 | |
335 | 342 | |
336 | 343 | |
|
Collapse file
test/parallel/test-assert.js
Copy file name to clipboardExpand all lines: test/parallel/test-assert.js+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
321 | 321 | |
322 | 322 | |
323 | 323 | |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
324 | 329 | |
325 | 330 | |
326 | 331 | |
|
0 commit comments