Commit 75c565b
test: improve expectWarning error message
expectWarning() fails with a TypeError and a message about undefined not
being iterable when the warning is emitted more times than expected.
This change produces a more useful error message.
Refs: https://github.com/nodejs/node/pull/41307/files#r775197738
PR-URL: #41326
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>1 parent c136d59 commit 75c565bCopy full SHA for 75c565b
File tree
Expand file treeCollapse file tree
2 files changed
+55
-1
lines changedOpen diff view settings
Filter options
- test
- common
- parallel
Expand file treeCollapse file tree
2 files changed
+55
-1
lines changedOpen diff view settings
Collapse file
+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
549 | 549 | |
550 | 550 | |
551 | 551 | |
552 | | - |
| 552 | + |
| 553 | + |
| 554 | + |
| 555 | + |
| 556 | + |
553 | 557 | |
554 | 558 | |
555 | 559 | |
|
Collapse file
test/parallel/test-common-expect-warning.js
Copy file name to clipboard+50Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
0 commit comments