Skip to content

Optional format for string diff error messages  #1351

@pomber

Description

@pomber

Feature request:

When comparing two string with t.is(actual, expected) sometimes, when the test fails, is better to have the two strings side by side instead of showing the diff. It would be nice if this can be configured in some way.

For example:
t.is("<undefined></undefined>", "<div></div>");

Current output :

  Difference:
    "<undefinedv></undefinedv>"

Suggested output (using same output as other types use):

  Actual:

    "<undefined></undefined>"

  Must be strictly equal to:

     "<div></div>"

Or even better:

    Actual: "<undefined></undefined>"
  Expected: "<div></div>"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions