Skip to content

Improve reporting of string differences #3088

@dennisdoomen

Description

@dennisdoomen

Background and motivation

While using BeEquivalentTo to compare two graphs containing string properties, I got the following error:

Expected property actual.Versions[0].Description to be the same string, but they differ at index 0:
   ↓ (actual)
  "Fluently building and…"
  ""
   ↑ (expected).
Expected property actual.Versions[1].Description to be the same string, but they differ at index 0:
   ↓ (actual)
  "Fluently building and…"
  ""
   ↑ (expected).

This is quite annoying as I can't see the full string. Let's see if we can display the entire string if it's under a certain length. Also, the message itself is a bit weird from a grammatical point of view.

Alternative Concerns

No response

Are you willing help with a pull-request?

No

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions