adriantoine / enzyme-to-json

Snapshot test your Enzyme wrappers
MIT License
947 stars 64 forks source link

Remove `Object {` from snapshots #104

Closed rattrayalex-stripe closed 5 years ago

rattrayalex-stripe commented 6 years ago

Hello & thanks for an awesome library!

I assume this feature is intentional, but I find it a bit noisy:

<Foo
  nestedObj={
    Object {
      "a": Object {
        "b": "c",
      },
    }
  }
/>

I would prefer:

<Foo
  nestedObj={{
    "a": {
      "b": "c",
    },
  }}
/>

I would be happy with an option to opt-in to this feature, as its release would break many snapshots in the wild.

Thoughts?

VincentLanglet commented 5 years ago

Array and Object keyword are coming from jest. I don't think we can do something about it.