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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
prettier called by toMatchInlineSnapshot
throws in typescript test containing any comments
#10208
Comments
toMatchInlineSnapshot
throws in typescript test containing a catch
block with a comment in ittoMatchInlineSnapshot
throws in typescript test containing any comments
So far I've tracked this down to
Adding a
|
Created a repl reproducing this with both |
This has been confirmed as a regression in In the meantime, you can use in
|
It is fixed in |
@JLHwung awesome, cheers for such a fast turnaround! |
Alright, I'm going to close this now since it's been a working week and the fix has shipped in a patch version, so we should be in the clear :) |
(if someone with permissions could chuck a few labels on for visibility, like "Fixed" and "Upstream Bug", that would be awesome) |
We can bump the minimum version of |
Ergh, looking at the linked pull request
Seems we need to fix some code on our side? @nicolo-ribaudo could you share some details about what Jest is doing that will break in next version of Babel? |
I think that could be useful :)
ugh yeah I meant to ask about that - I spent a decent amount of time trying to pin down where this was coming from in the jest codebase, but couldn't find it. This is the "entry" point where the problem starts from, but when tracing that back I couldn't find evidence that it was coming from jest itself; instead it seemed to be a result of the parser being used by prettier, which in turn is meant to be Additionally, This is where I tracked it to in the parser: If I changed that to |
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
When using
toMatchInlineSnapshot
in a typescript test with a comment, an error is thrown:This seems to be because of a change in a dependency, as it doesn't happen with
eslint-plugin-eslint-config
which I was working on last week.To Reproduce
Expected behavior
The test to pass, and the snapshot to be written.
Link to repl or repo (highly encouraged)
envinfo
The text was updated successfully, but these errors were encountered: