Skip to content

Commit

Permalink
revert changes to getInvocationDetails to see if that breaks tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cacieprins committed Dec 17, 2024
1 parent 81cacf8 commit 125b41e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/driver/src/cypress/error_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (!Error.captureStackTrace) {
Error.captureStackTrace = (err, fn) => {
const stack = (new Error()).stack

;(err as Error).stack = $stackUtils.stackWithLinesDroppedFromMarker(stack, fn?.name, false)
;(err as Error).stack = $stackUtils.stackWithLinesDroppedFromMarker(stack, fn?.name)
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/driver/src/cypress/stack_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ const getInvocationDetails = (specWindow, config) => {
// firefox throws a different stack than chromium
// which includes stackframes from cypress_runner.js.
// So we drop the lines until we get to the spec stackframe (includes __cypress/tests)
if (specWindow.Cypress) {
stack = stackWithLinesDroppedFromMarker(stack, '/__cypress', !specWindow.Cypress.isBrowser('webkit'))
if (specWindow.Cypress && specWindow.Cypress.isBrowser('firefox')) {
stack = stackWithLinesDroppedFromMarker(stack, '__cypress/tests', true)
}

const details: InvocationDetails = getSourceDetailsForFirstLine(stack, config('projectRoot')) || {};
Expand Down

0 comments on commit 125b41e

Please sign in to comment.