Replies: 3 comments
-
verify tries to make the output more readable. the newline logic is part of that. if you prefer to disable that behaviour try strict json https://github.com/VerifyTests/Verify/blob/main/docs/serializer-settings.md#usestrictjson |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick reply. Strict JSON might be an option, will look into that. No offence meant, but I find the current logic odd nevertheless. If I add to the class above another property with two newline characters at the beginning:
Then I get the following received file:
It seems like only the first newline character is removed. This might be rather subjective, but if it's supposed to be more readable, then I'd expect Property3 and Property4 to be the same. As it is I find it confusing. |
Beta Was this translation helpful? Give feedback.
-
happy to consider a pull request that adds an API to opt in to the behavior you desire |
Beta Was this translation helpful? Give feedback.
-
This class
when run through through this test using Verify.Xunit 23.1.0 using default verifier settings:
yields the following received file:
The newline character at the beginning of strings matters to me, so I'd expect the received file to look like this:
Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions