New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline Snapshot Error could use clarification? "Multiple inline snapshots for the same call are not supported." #6636
Comments
cc @azz |
Mind setting up a reproduction? |
Was the |
Would be nice either way to throw an error with the async error stack so it'd point back to the invocation |
@azz I figured it out. :) I had these in places where in-lining wasn't possible (separate helper function call) but from the looks of it I can convert my helper/serializer into a custom |
OK, so not a bug, then. Good! 🙂 But I still think we should fix the trace, plus maybe add some hints to the error message (like, "do not use in loops or in helper function") |
Agreed @SimenB the trace would have made it really apparent to me along with the hint. It would be neat to see some way to inline for a |
This also happens in conjunction with
Took me a while to figure that out ^^ |
That seems like a bug. Might've been fixed by #8629? |
That's possible, is there a prerelease I could try? |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
🐛 Bug Report
I updated to Jest 23.3 and wanted to give the new inline snapshots a try and had failures that I struggling to understand. I received the error above and this stacktrace, but it doesn't point me at all at my code so I don't know where or what I should fix.
To Reproduce
Steps to reproduce the behavior:
I'm not sure? I had a custom snapshot serializer and a test where I changed
.toMatchSnapshot
to.toMatchInlineSnapshot
and the error is too cryptic so far.Expected behavior
That the error and stacktrace would be more informative as to what needs to be changed.
Link to repl or repo (highly encouraged)
Please provide either a repl.it demo or a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: