You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snapshot seems to sometimes have weird characters at the end of lines in the generated .md file. There have been some cases where with a component, it would render a unicode star.
The one use-case the is simple to reproduce and always happens is using a snap show to compare a simple sting. I want to use a snapshot because the string is dynamically generated and can be quite large and write those test is any other way would just take too much time and would be very brittle. The issue with snapshotting string if that the line return character are being literally printed out:
## test
> Snapshot 1
`just want␊
to test␍␊
something`
I found it a bit surprising (at least for the weird star that I have no idea why it is there, the line feed one at least makes sense on why it would be there).
As for effecting the test, no, it does not really impact it all that much (it is seems weird as I usually don't see those characters), just wanted to point this out as I was not sure if it was expected or not. Since it is intentional, I am good with it.
By "weird star" do you mean ⍟? I agree it's a bit obscure — I think it's only used with React elements. The intent is to show the difference between built-in types (they end up being strings) and function types that could have the same name.
Description
Snapshot seems to sometimes have weird characters at the end of lines in the generated
.md
file. There have been some cases where with a component, it would render a unicode star.The one use-case the is simple to reproduce and always happens is using a snap show to compare a simple sting. I want to use a snapshot because the string is dynamically generated and can be quite large and write those test is any other way would just take too much time and would be very brittle. The issue with snapshotting string if that the line return character are being literally printed out:
Test Source
Environment
Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:
The text was updated successfully, but these errors were encountered: