digitalfabrik / app-toolbelt

Whitelabel tool used internally at Digitalfabrik
2 stars 0 forks source link

Fix whitespace errors of snapshot tests #5

Open ztefanie opened 5 months ago

ztefanie commented 5 months ago

The snapshot tests failed on my local machine due to "missing" white spaces, after adding the the "missing" whitespaces, if fails in the CI. Would be nice if we somehow can change the snapshot testing so it is ignoring whitespaces or at least they lead to the same behavior on different machines.

See e.g. this for reference: https://app.circleci.com/pipelines/github/digitalfabrik/app-toolbelt/11/workflows/53fb5e5f-3df2-4ec5-8e87-3aeebf725e88/jobs/12

steffenkleinle commented 5 months ago

I think I had this problem (or similar) before n another context with date time library, where I added a normalizeWhitespace before: https://github.com/digitalfabrik/integreat-app/blob/ca719e98ebc24facb0e5478f8402a1733c6ee934/api-client/src/models/__tests__/DateModel.spec.ts#L10