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
Inline snapshots don't work with this combo of packages. This may be related to #6744, but it happens even without matching the criteria in that ticket.
Jest: Couldn't locate all inline snapshots.
at Object.parse (node_modules/jest-snapshot/build/InlineSnapshots.js:267:11)
at Object.parse (node_modules/prettier/index.js:13625:19)
at coreFormat (node_modules/prettier/index.js:14899:14)
at format (node_modules/prettier/index.js:15131:14)
at node_modules/prettier/index.js:57542:12
at Object.format (node_modules/prettier/index.js:57562:12)
To Reproduce
Steps to reproduce the behavior:
Install most-recent babel, jest, and babel-plugin-source-map-support
I'm experiencing this as well, I've verified that babel-jest is producing valid source maps (pulled the sourcemap out of babel-jest via the inspector and checked with http://sokra.github.io/source-map-visualization/) but then source-map-support isn't able to find those source maps when toMatchInlineSnapshot() is called so the new Error().stack isn't correct and the correct call can't be found. It also seems that source-map-support is installed several times and there are several instances of that module... which might be the root problem here...
Wow, yeah, one of the files imported by my tests had source-map-support/register in it which seems to have broken it, but removing that import fixed it!
Jest handles installation of sourcemaps itself, so you should remove any source-map-support usage in your own code when running tests.
(if you need it for your app, you should set it up in the entrypoint of it, not every single source file, but that's really something to discuss here 🙂)
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.
🐛 Bug Report
Inline snapshots don't work with this combo of packages. This may be related to #6744, but it happens even without matching the criteria in that ticket.
To Reproduce
Steps to reproduce the behavior:
Link to repl or repo (highly encouraged)
https://repl.it/@stopcontinues/inline-snapshots-busted
envinfo
The text was updated successfully, but these errors were encountered: