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
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Minimal Repository:
https://github.com/denniske/jest-stacktrace-demo
yarn test
will produce the following:The error does not occur in greeter.test.js:25, but in greeter.test.js:27.
The problem is that I am using
expect
statements inside the callback of a custom matchertoHaveBeenCalledWithSome
.This causes the stacktrace to be cut in the outer matcher
toHaveBeenCalledWithSome
here:https://github.com/facebook/jest/blob/a397abaf9f08e691f8739899819fc4da41c1e476/packages/expect/src/index.js#L204
What is the expected behavior?
Do not cut the stacktrace such that error is reported correctly at greeter.test.js:27.
I would suggest to only cur stacktrace when error is no JestAssertionError:
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
No jest config, versions are:
Jest - 21.1.0,
Node - 7.10.0
npm - 4.6.1
OS - Windows 10
The text was updated successfully, but these errors were encountered: