Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add json format config #121

Merged
merged 4 commits into from
Feb 14, 2025
Merged

Conversation

kitimark
Copy link
Contributor

Hello guys.

I'd like to propose add json format config into snaps.Config. for custom json formatting when take the snapshot.

example json format config

 s := snaps.WithConfig(
    snaps.JSON(snaps.JSONConfig{
      Width:    80,
      Indent:   "    ",
      SortKeys: false,
    }),
  )

s.MatchJSON(t, value)
s.MatchStandaloneJSON(t, value)

@gkampitakis
Copy link
Owner

Hey 👋 Thanks for this contribution. I think it's a good addition will take some time to review it 😄

Copy link
Owner

@gkampitakis gkampitakis left a comment

Choose a reason for hiding this comment

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

LGTM

@gkampitakis gkampitakis merged commit e004bc1 into gkampitakis:main Feb 14, 2025
4 checks passed
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.

2 participants