Commit ec2913f
test: unify assertSnapshot stacktrace transform
The snapshotted stack frames should hide node internal stack frames so
that general node core development does not need updating the snapshot.
For userland stack frames, they are highly fixture related and any
fixture change should reflect in a change of the snapshot. Additionally,
the line and column number are highly relevant to the correctness of the
snapshot, these should not be redacted. A change in node core that
affects userland stack frames should be alarming and be reflected in the
snapshots.
Features like test runner and source map support both should snapshot
userland stack frames to ensure that userland code locations are
computed correctly.
PR-URL: #61665
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>1 parent d79984b commit ec2913fCopy full SHA for ec2913f
77 files changed
+1,515-2,704Lines changed: 1515 additions & 2704 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- test
- common
- fixtures
- console
- errors
- eval
- source-map/output
- test-runner/output
- v8
- vm
- parallel
- test-runner
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
Open diff view settings
Collapse file
test/common/assertSnapshot.js
Copy file name to clipboardExpand all lines: test/common/assertSnapshot.js+93-44Lines changed: 93 additions & 44 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
6 | 7 | |
7 | 8 | |
8 | 9 | |
9 | 10 | |
10 | | - |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
11 | 30 | |
12 | 31 | |
13 | 32 | |
| ||
17 | 36 | |
18 | 37 | |
19 | 38 | |
20 | | - |
21 | | - |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
22 | 53 | |
23 | 54 | |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
24 | 62 | |
25 | | - |
26 | | - |
27 | | - |
| 63 | + |
| 64 | + |
| 65 | + |
28 | 66 | |
29 | 67 | |
30 | 68 | |
| ||
36 | 74 | |
37 | 75 | |
38 | 76 | |
39 | | - |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
40 | 83 | |
41 | 84 | |
42 | 85 | |
| ||
55 | 98 | |
56 | 99 | |
57 | 100 | |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
| 101 | + |
| 102 | + |
| 103 | + |
63 | 104 | |
64 | | - |
65 | | - |
66 | | - |
| 105 | + |
| 106 | + |
| 107 | + |
67 | 108 | |
68 | 109 | |
69 | 110 | |
70 | 111 | |
71 | | - |
| 112 | + |
72 | 113 | |
73 | 114 | |
74 | 115 | |
75 | 116 | |
76 | 117 | |
77 | | - |
| 118 | + |
78 | 119 | |
79 | 120 | |
80 | 121 | |
81 | 122 | |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
82 | 148 | |
83 | 149 | |
84 | 150 | |
| ||
149 | 215 | |
150 | 216 | |
151 | 217 | |
152 | | - |
153 | | - |
154 | | - |
155 | 218 | |
156 | 219 | |
157 | 220 | |
158 | | - |
159 | | - |
| 221 | + |
160 | 222 | |
161 | 223 | |
162 | 224 | |
163 | 225 | |
164 | 226 | |
165 | 227 | |
166 | 228 | |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | | - |
172 | | - |
173 | | - |
174 | | - |
175 | | - |
176 | | - |
| 229 | + |
177 | 230 | |
178 | 231 | |
179 | 232 | |
| ||
194 | 247 | |
195 | 248 | |
196 | 249 | |
197 | | - |
198 | | - |
199 | | - |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
200 | 255 | |
201 | 256 | |
202 | 257 | |
203 | | - |
204 | 258 | |
205 | 259 | |
206 | 260 | |
207 | 261 | |
| 262 | + |
| 263 | + |
| 264 | + |
208 | 265 | |
209 | 266 | |
210 | 267 | |
211 | 268 | |
212 | | - |
213 | | - |
214 | 269 | |
215 | | - |
216 | 270 | |
217 | 271 | |
218 | 272 | |
219 | 273 | |
220 | | - |
221 | 274 | |
222 | 275 | |
223 | 276 | |
224 | 277 | |
225 | | - |
226 | 278 | |
227 | 279 | |
228 | 280 | |
229 | | - |
230 | | - |
231 | 281 | |
232 | 282 | |
233 | 283 | |
| ||
246 | 296 | |
247 | 297 | |
248 | 298 | |
249 | | - |
250 | 299 | |
251 | 300 | |
252 | 301 | |
|
Collapse file
test/fixtures/console/console.snapshot
Copy file name to clipboard+2-8Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
| 2 | + |
| 3 | + |
Collapse file
test/fixtures/console/stack_overflow.snapshot
Copy file name to clipboardExpand all lines: test/fixtures/console/stack_overflow.snapshot+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
3 | 3 | |
4 | 4 | |
5 | 5 | |
|
Collapse file
test/fixtures/errors/async_error_nexttick_main.snapshot
Copy file name to clipboard+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
4 | | - |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | 7 | |
Collapse file
test/fixtures/errors/core_line_numbers.snapshot
Copy file name to clipboard+2-3Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | | - |
| 1 | + |
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
7 | | - |
| 6 | + |
8 | 7 | |
9 | 8 | |
10 | 9 | |
Collapse file
test/fixtures/errors/error_aggregateTwoErrors.snapshot
Copy file name to clipboardExpand all lines: test/fixtures/errors/error_aggregateTwoErrors.snapshot+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | | - |
| 1 | + |
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
| 14 | + |
15 | 15 | |
16 | 16 | |
17 | 17 | |
|
Collapse file
test/fixtures/errors/error_exit.snapshot
Copy file name to clipboardExpand all lines: test/fixtures/errors/error_exit.snapshot+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
|
Binary file not shown.
Collapse file
test/fixtures/errors/events_unhandled_error_common_trace.snapshot
Copy file name to clipboard+5-5Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | | - |
| 1 | + |
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
7 | | - |
| 6 | + |
| 7 | + |
8 | 8 | |
9 | | - |
10 | | - |
| 9 | + |
| 10 | + |
11 | 11 | |
12 | 12 | |
Collapse file
test/fixtures/errors/events_unhandled_error_nexttick.snapshot
Copy file name to clipboard+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | | - |
| 1 | + |
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
7 | 7 | |
8 | | - |
| 8 | + |
9 | 9 | |
10 | 10 | |
0 commit comments