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

Snapshot's whitespace differs between environments #95

Closed
donpinkus opened this issue Feb 2, 2018 · 1 comment
Closed

Snapshot's whitespace differs between environments #95

donpinkus opened this issue Feb 2, 2018 · 1 comment

Comments

@donpinkus
Copy link

donpinkus commented Feb 2, 2018

I'm hesitant to open an issue for this - but after a few days of research don't have any other clues.

We are using Jest with Enzyme, and using enzyme-to-json to create snapshots of Enzyme wrappers.

When some of us create snapshots, we get 2 spaces per indentation. When others of us create the snapshots, we get 4 spaces per indentation.

Environment:

  • MacOS
  • Node 9.4.0
  • Jest 22.1.4
  • Enzyme 3.2.0
  • enzyme-to-json 3.0.0

Is there an option in enzyme-to-json that specifies how much whitespace it uses?
Or has anyone experienced whitespace / formatting differences between machines?

@adriantoine
Copy link
Owner

Hi @donpinkus,

I'm sorry for the late reply! enzyme-to-json doesn't actually format snapshots, it is transforming Enzyme wrappers in a format compatible with Jest snapshots. As far as I remember the formatting of snapshots was done by the pretty-format package so I think you should open an issue on the Jest repository.

I am closing this as it is not an enzyme-to-json bug.

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

No branches or pull requests

2 participants