-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 snapshots indented at col 0 when existing inline snapshots in file #9477
Comments
I've got this as well - I'd think it's b/c of #9203, but I've attempted a revert to no effect. I'll have a poke around to see if I can find what has caused this to regress from 24.9 - will also need to find a way to make a test; jest might already have some "run twice" tests, but not hopefully something can be hacked together. |
@SimenB can you assign this to me? I've got a fix incoming. |
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 a new inline snapshot is generated in a file that already contains inline snapshots, the new snapshot content is incorrectly indented far left, at column 0.
To Reproduce
The following code upon file save produces a correctly indented snapshot:
Becomes -
However, with two
test
blocks present, the first already containing an inline snapshot -On save, becomes -
Expected behavior
In the second example above, I would expect the snapshot in the second test block to be indented the same as the first, not hard left.
envinfo
The text was updated successfully, but these errors were encountered: