You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be more general in stripping off stack frames to fix Firefox tests (#2425)
* Revert breaking change to stack-stripping regex
This regex was made more specific in an attempt to avoid incorrectly
stripping off parts of messages - we strip off anything after " at",
which means "to have been called at least once" becomes "to have been
called".
However, the new regex was too specific and made faulty assumptions
about stack traces - namely, that they'll always have parentheses after
the at. Firefox's stack traces, however, look like so:
func() at callFn@about:blank line 2 > injectedScript:47353:21
So, we could try to come up with a better regex that matches all
browsers that we test with, or perhaps add some sort of indicator when
we're appending the stack traces, but since this change is breaking the
tests for everyone right now, for expedience we'll just revert to how we
were stripping things before.
This means changing one of the asserts back to how it was before, where
it was asserting against a partial message due to the over-eager
stripping, so add a comment about that as well.
* Update with a more general regex
This should match any stack frame format that has at least one non-word,
non-space character in it, which should be a pretty safe assumption, and
holds for the three browsers we test in anyway.
This gets us back to not trimming messages improperly, while also not
breaking firefox, and I think is reasonable as far as regexes go.
This seems like a reasonable enough regex - the original fixed one was
overly complicated because it tried to remove an arbitrary number of
stack frames, which was unnecessary because we only append one.
0 commit comments