Skip to content

Commit

Permalink
new snapshots with more accurate invocation details
Browse files Browse the repository at this point in the history
  • Loading branch information
cacieprins committed Dec 18, 2024
1 parent 1dcc5ab commit 7378f8e
Show file tree
Hide file tree
Showing 2 changed files with 335 additions and 336 deletions.
7 changes: 3 additions & 4 deletions packages/driver/src/cypress/stack_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,10 @@ const getInvocationDetails = (specWindow, config) => {
// note: specWindow.Cypress can be undefined or null
// if the user quickly reloads the tests multiple times

// 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)
// firefox and chrome throw stacks that include lines from cypress
// So we drop the lines until we get to the spec stackframe (includes __cypress)
if (specWindow.Cypress) {
stack = stackWithLinesDroppedFromMarker(stack, '__cypress/tests', true)
stack = stackWithLinesDroppedFromMarker(stack, '__cypress', true)
}

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

0 comments on commit 7378f8e

Please sign in to comment.