Before when a when mock was defined and not called the verifyAllWhenMocksCalled function only printed the exact line, where the mock was defined. This is almost useless when the actual mock definition happens in a function (e.g. because they share the locations with different arguments to the wrapping function).
Now the error message contains the full stack trace through all the call stack frames the mock definition passed.
Also changes the implementation of the test "fails verification check if all mocks were not called with line numbers" to handle long error messages. Before the regex ran into a Catastrophic backtracking error. Now we split the error lines manually and test them one by one with the same regex.
Before when a
when
mock was defined and not called theverifyAllWhenMocksCalled
function only printed the exact line, where the mock was defined. This is almost useless when the actual mock definition happens in a function (e.g. because they share the locations with different arguments to the wrapping function).Now the error message contains the full stack trace through all the call stack frames the mock definition passed.
Also changes the implementation of the test "fails verification check if all mocks were not called with line numbers" to handle long error messages. Before the regex ran into a
Catastrophic backtracking
error. Now we split the error lines manually and test them one by one with the same regex.CC: @niklasschildhauer @semssamaras @christophmuth @janseeger