jest
jest copied to clipboard
add(snaplink): add customisation to snapshot reference link
Summary
Some snapshots I use require special descriptions and there are currently no way to change the description url
Test plan
Ran all the tests and created a new one to check if the functionality works. And it does.
What's the use case here? Are you using jest-snapshot in a standalone matter? Via a custom matcher?
Thanks, @eduelias
What's the use case here? Are you using
jest-snapshotin a standalone matter? Via a custom matcher?
Hi @SimenB! Thanks for your question! In fact there are two needs here: One, to be able to remove the link altogether in some environments, where we have some strict "no links in code" policy. And the second one to be able to use this link to our own documentation about those snapshots.
It seems this got a bit stale ... Can someone or approve it or reject it, please? Thanks! :D
If you need this feature in Jest, I am not sure if environmental variable is the best solution. I think it should be at least prefixed: JEST_SNAPSHOT_GUIDE_LINK.
Configuration has snapshotFormat option. Perhaps it could have a property called guideLink or so?
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.
This pull request 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.