-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show object diffs in Mocha #29
Comments
Chai throws an assertion error in this format: { [AssertionError: expected { a: 1, b: 2, c: 3 } to equal { a: 1, b: 2, c: 4 }]
message: 'expected { a: 1, b: 2, c: 3 } to equal { a: 1, b: 2, c: 4 }',
showDiff: true,
actual: { a: 1, b: 2, c: 3 },
expected: { a: 1, b: 2, c: 4 } } |
Merged
Fixed in #30 |
Anything similar possible for Karma? |
Karma just runs browsers and reports the results to the console. Use mocha with karma to get these doffs in the console. |
For anyone finding this via Google, karma-mocha-reporter provides this functionality, and is pretty much drop-in. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a comparison of how Chai and Expect handles object diffs. Notice how it's very readable with the diff being shown.
made using this code:
The text was updated successfully, but these errors were encountered: