jest icon indicating copy to clipboard operation
jest copied to clipboard

add(snaplink): add customisation to snapshot reference link

Open eduelias opened this issue 2 years ago • 3 comments

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.

eduelias avatar Jan 26 '23 09:01 eduelias

What's the use case here? Are you using jest-snapshot in a standalone matter? Via a custom matcher?

SimenB avatar Jan 26 '23 14:01 SimenB

Thanks, @eduelias

rishiraj88 avatar Jan 26 '23 17:01 rishiraj88

What's the use case here? Are you using jest-snapshot in 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.

eduelias avatar Jan 26 '23 18:01 eduelias

It seems this got a bit stale ... Can someone or approve it or reject it, please? Thanks! :D

eduelias avatar Feb 16 '23 12:02 eduelias

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?

mrazauskas avatar Feb 16 '23 14:02 mrazauskas

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.

github-actions[bot] avatar May 17 '23 15:05 github-actions[bot]

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.

github-actions[bot] avatar Jun 16 '23 16:06 github-actions[bot]

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.

github-actions[bot] avatar Jul 17 '23 00:07 github-actions[bot]