Back to Mocha

Diffs

docs-next/src/content/docs/features/diffs.mdx

11.7.6335 B
Original Source

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: