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
Thanks for all your work! It works really well. Just a small feature request that someone or me later could pick up and add, as right now if I run a test from a ts file and run the same test from the transpiled js it doesn't recognize the snapshots but creates 2 different snapshot files.
Could be implemented as an option, or maybe even just as the default (if two files differed only in the 1 letter (j vs t in the extension), could also be added for tsx and js I guess, though if default it would be a breaking change
The text was updated successfully, but these errors were encountered:
@emilgoldsmith I think by default we could choose to strip the file extension from the filename, for example: example.spec.ts -> __snapshots__/example.spec.js example.spec.js -> __snapshots__/example.spec.js example.spec.jsx -> __snapshots__/example.spec.js
maybe this is suggested somewhere else already however.
As a temporary solution for you, you should be able to do this to modify the filename on the mocha context object. The following will remove the extension from the filename that snapshot reads
Thanks for all your work! It works really well. Just a small feature request that someone or me later could pick up and add, as right now if I run a test from a ts file and run the same test from the transpiled js it doesn't recognize the snapshots but creates 2 different snapshot files.
Could be implemented as an option, or maybe even just as the default (if two files differed only in the 1 letter (j vs t in the extension), could also be added for tsx and js I guess, though if default it would be a breaking change
The text was updated successfully, but these errors were encountered: