Commit a5ee31b
assert: accept regular expressions to validate
This makes sure regular expressions on validation objects validate
against strings when used with `assert.throws` and `assert.rejects`.
PR-URL: #20485
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>1 parent 08097cc commit a5ee31bCopy full SHA for a5ee31b
File tree
Expand file treeCollapse file tree
3 files changed
+88
-11
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
3 files changed
+88
-11
lines changedOpen diff view settings
Collapse file
+44-6Lines changed: 44 additions & 6 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1070 | 1070 | |
1071 | 1071 | |
1072 | 1072 | |
1073 | | - |
1074 | | - |
1075 | | - |
| 1073 | + |
| 1074 | + |
| 1075 | + |
| 1076 | + |
| 1077 | + |
1076 | 1078 | |
1077 | 1079 | |
1078 | 1080 | |
1079 | 1081 | |
1080 | | - |
| 1082 | + |
1081 | 1083 | |
1082 | 1084 | |
1083 | 1085 | |
1084 | 1086 | |
| 1087 | + |
| 1088 | + |
| 1089 | + |
| 1090 | + |
| 1091 | + |
| 1092 | + |
1085 | 1093 | |
1086 | 1094 | |
1087 | 1095 | |
1088 | 1096 | |
1089 | 1097 | |
1090 | 1098 | |
1091 | 1099 | |
1092 | | - |
1093 | | - |
| 1100 | + |
| 1101 | + |
| 1102 | + |
| 1103 | + |
| 1104 | + |
| 1105 | + |
| 1106 | + |
| 1107 | + |
| 1108 | + |
| 1109 | + |
| 1110 | + |
| 1111 | + |
| 1112 | + |
| 1113 | + |
| 1114 | + |
| 1115 | + |
| 1116 | + |
| 1117 | + |
| 1118 | + |
| 1119 | + |
| 1120 | + |
| 1121 | + |
| 1122 | + |
| 1123 | + |
| 1124 | + |
| 1125 | + |
| 1126 | + |
| 1127 | + |
| 1128 | + |
| 1129 | + |
| 1130 | + |
| 1131 | + |
1094 | 1132 | |
1095 | 1133 | |
1096 | 1134 | |
|
Collapse file
+18-5Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
35 | 35 | |
36 | 36 | |
37 | 37 | |
38 | | - |
| 38 | + |
39 | 39 | |
40 | 40 | |
41 | 41 | |
| ||
362 | 362 | |
363 | 363 | |
364 | 364 | |
365 | | - |
| 365 | + |
366 | 366 | |
367 | | - |
368 | | - |
| 367 | + |
| 368 | + |
| 369 | + |
| 370 | + |
| 371 | + |
| 372 | + |
| 373 | + |
| 374 | + |
| 375 | + |
| 376 | + |
369 | 377 | |
370 | 378 | |
371 | 379 | |
| ||
375 | 383 | |
376 | 384 | |
377 | 385 | |
378 | | - |
| 386 | + |
379 | 387 | |
380 | 388 | |
381 | 389 | |
| ||
415 | 423 | |
416 | 424 | |
417 | 425 | |
| 426 | + |
| 427 | + |
| 428 | + |
| 429 | + |
| 430 | + |
418 | 431 | |
419 | 432 | |
420 | 433 | |
|
Collapse file
test/parallel/test-assert.js
Copy file name to clipboardExpand all lines: test/parallel/test-assert.js+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
914 | 914 | |
915 | 915 | |
916 | 916 | |
| 917 | + |
| 918 | + |
| 919 | + |
| 920 | + |
| 921 | + |
| 922 | + |
| 923 | + |
| 924 | + |
| 925 | + |
| 926 | + |
| 927 | + |
| 928 | + |
| 929 | + |
| 930 | + |
| 931 | + |
| 932 | + |
| 933 | + |
| 934 | + |
| 935 | + |
| 936 | + |
| 937 | + |
| 938 | + |
| 939 | + |
| 940 | + |
| 941 | + |
| 942 | + |
0 commit comments