Commit 0aab92f
test: add test for async hooks parity for async/await
Add a basic test ensuring parity between before-after and
init-promiseResolve hooks when using async/await.
Add ability to initHooks and to checkInvocations utilities to transmit
promiseResolve hook as well.
See: #20516
PR-URL: #20626
Refs: #20516
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com>1 parent 7a98008 commit 0aab92fCopy full SHA for 0aab92f
File tree
Expand file treeCollapse file tree
3 files changed
+106
-2
lines changedOpen diff view settings
Filter options
- test/async-hooks
Expand file treeCollapse file tree
3 files changed
+106
-2
lines changedOpen diff view settings
Collapse file
test/async-hooks/hook-checks.js
Copy file name to clipboardExpand all lines: test/async-hooks/hook-checks.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
28 | | - |
| 28 | + |
29 | 29 | |
30 | 30 | |
31 | 31 | |
|
Collapse file
test/async-hooks/init-hooks.js
Copy file name to clipboardExpand all lines: test/async-hooks/init-hooks.js+14-1Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
| 28 | + |
28 | 29 | |
29 | 30 | |
30 | 31 | |
| ||
39 | 40 | |
40 | 41 | |
41 | 42 | |
| 43 | + |
| 44 | + |
42 | 45 | |
43 | 46 | |
44 | 47 | |
45 | 48 | |
46 | 49 | |
47 | 50 | |
48 | | - |
| 51 | + |
| 52 | + |
49 | 53 | |
50 | 54 | |
51 | 55 | |
| ||
206 | 210 | |
207 | 211 | |
208 | 212 | |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
209 | 220 | |
210 | 221 | |
211 | 222 | |
| ||
219 | 230 | |
220 | 231 | |
221 | 232 | |
| 233 | + |
222 | 234 | |
223 | 235 | |
224 | 236 | |
| ||
228 | 240 | |
229 | 241 | |
230 | 242 | |
| 243 | + |
231 | 244 | |
232 | 245 | |
233 | 246 | |
|
Collapse file
test/async-hooks/test-async-await.js
Copy file name to clipboard+91Lines changed: 91 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 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
0 commit comments