snapshot-diff icon indicating copy to clipboard operation
snapshot-diff copied to clipboard

Consider calling rendering with current jest.config

Open siebigteroth opened this issue 5 years ago • 3 comments

Currently, the configured jest.config isn't considered when creating snapshots. Therefore, e.g. styled-component serializer is ignored, if configured. Issue #30 is similar, but doesn't consider existing configurations.

siebigteroth avatar May 06 '19 09:05 siebigteroth

Sounds reasonable. Would you like implementing this change? We could leverage jest-config for that. This would require adding it as a dependency or a peer dependency. cc @SimenB

thymikee avatar May 06 '19 09:05 thymikee

maybe we could somehow pass in the config so you could delegate to other serializers first, then do your diff?

SimenB avatar May 06 '19 13:05 SimenB

@siebigteroth FYI, we just released v0.6.0 with setSerializers API, which can unblock you: https://github.com/jest-community/snapshot-diff#custom-serializers

thymikee avatar Nov 05 '19 09:11 thymikee