-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gracefully handle linebreaks in test titles #2774
Comments
Yep, it is definitely better to have normalized whitespace throughout the whole test lifetime. |
Hmm. I may need the And it looks like there is no test for try assertions anywhere. |
I think those are tested at https://github.com/avajs/ava/blob/main/test-tap/test-try-commit.js. |
Fixes #2774. Co-authored-by: Mark Wubben <mark@novemberborn.net>
If test titles include line breaks, the snapshot reports for those tests will look a bit weird since the formatting code does not handle them. Reporter output may be broken too.
Per discussion in #2769 (comment) we could normalize whitespace in test titles at the point of declaration, which then impacts uniqueness checks, or we could do so when displaying.
My preference would actually be to do this at the point of declaration, which should be considered a breaking change given that we identify the test by its title. But that's OK since we're doing pre-releases for AVA 4 at the moment.
@KillyMXI what do you think?
The text was updated successfully, but these errors were encountered: