-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: normalize test body invocationDetails from stack traces
#32699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 2 commits
3bb1471
b6bc0f5
926e1fc
49165cf
61311ee
0a8de00
a1480d8
36064a6
65d656c
c0fb620
96a9a10
d0dfb88
5d5cc2d
79c51da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,12 @@ const stackWithLinesRemoved = (stack, cb) => { | |
| return unsplitStack(messageLines, remainingStackLines) | ||
| } | ||
|
|
||
| const stackWithGrepLinesRemoved = (stack) => { | ||
| return stackWithLinesRemoved(stack, (lines) => { | ||
| return _.reject(lines, (line) => line.includes('itGrep')) | ||
| }) | ||
| } | ||
|
|
||
| const stackWithLinesDroppedFromMarker = (stack, marker, includeLast = false) => { | ||
| return stackWithLinesRemoved(stack, (lines) => { | ||
| // drop lines above the marker | ||
|
|
@@ -149,6 +155,12 @@ const getInvocationDetails = (specWindow, config): InvocationDetails | undefined | |
| } | ||
| } | ||
|
|
||
| // if the stack includes the 'itGrep' function, remove any lines that include it | ||
|
||
| // so that the first line in the stack is the spec invocation | ||
| if (stack.includes('itGrep')) { | ||
| stack = stackWithGrepLinesRemoved(stack) | ||
| } | ||
|
|
||
| const details: Omit<InvocationDetails, 'stack'> = getSourceDetailsForFirstLine(stack, config('projectRoot')) || {}; | ||
|
|
||
| (details as any).stack = stack | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.