Skip to content

Gracefully handle linebreaks in test titles #2774

@novemberborn

Description

@novemberborn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingrequires a SemVer major releasebugcurrent functionality does not work as desiredhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions