MatcherBase::match()
runs before EventListenerBase::assertionStarting()
#2678
Labels
MatcherBase::match()
runs before EventListenerBase::assertionStarting()
#2678
Describe the bug
The docs say that
assertionStarting
is called after the expression is captured, but before the assertion expression is evaluated. For custom matchers thematch
member function is in charge of evaluating the assertion expression, but by the time theassertionStarting
event is dispatchedmatch
has already been invoked.Expected behavior
assertionStarting
should run before custom matchers.Reproduction steps
Additional context
I'm trying to use a listener to update global variables to be able to access the current assertion file and line in a custom matcher. If there's another way to do it let me know :)
The text was updated successfully, but these errors were encountered: