Skip to content

Conversation

@bentsku
Copy link
Contributor

@bentsku bentsku commented Jun 20, 2025

@pinzon recently shared a trick regarding snapshot skips path that would contain special characters.
It made me remember a fix I had done before this was even its own library with localstack/localstack#6802, allowing us to use single quote in snapshot skip paths for those special characters.

This PR adds better suggestion by detecting and wrapping part elements that would contain such characters so that users could directly copy paste the snapshot skip path and it would work out of the box, instead of having weird issues.
Luckily there were already tests for the helper function, thanks @dominikschubert 🙏

For example, for this kind of error which would fail if you copy pasted it to skip that path before, this would be the new message:

	Ignore list (please keep in mind list indices might not work and should be replaced):
-	["$..cognito:user_status"]
+	["$..'cognito:user_status'"]

@bentsku bentsku self-assigned this Jun 20, 2025
@bentsku bentsku force-pushed the improve-skip-suggestion branch from 437919e to e02fe08 Compare June 20, 2025 21:57
Copy link
Contributor

@tiurin tiurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome addition to usability! 👏

@bentsku bentsku merged commit ec575d7 into main Jun 27, 2025
3 checks passed
Copy link
Contributor

@tiurin tiurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants