Open
Description
Example Request Checklist
- I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
- I have searched for related issues, but none matched my issue.
- I want to provide a PR to resolve this
Overview
From https://mochajs.org/#diffs:
Mocha supports the
err.expected
anderr.actual
properties of any thrownAssertionErrors
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
:
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.