Skip to content

🚀 Example: Add one for the diff property #122

Open
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Example Request Checklist

Overview

From https://mochajs.org/#diffs:

Mocha supports the err.expected and err.actual properties of any thrown AssertionErrors from an assertion library. Mocha will attempt to display the difference between what was expected, and what the assertion actually saw. Here’s an example of a “string” diff using --inline-diffs:

Screenshot of a Mocha red and green diff for a test failure

No examples demonstrate this diffing functionality right now.

Suggested Solution

How about we add an example that can show a nice string diff?

Additional Info

This would be nice for mochajs/mocha#5348: a PR that bumps Mocha's diff dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions