Skip to content
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

Objects are difficult to differentiate. #18

Closed
dylang opened this issue Oct 24, 2015 · 1 comment
Closed

Objects are difficult to differentiate. #18

dylang opened this issue Oct 24, 2015 · 1 comment

Comments

@dylang
Copy link

dylang commented Oct 24, 2015

I'm trying power-assert thanks to the recent addition to AVA in avajs/ava#46.

The examples show some simple values like true, foo, and look really nice, but I'm finding in reality my asserts are on much more complex objects and the output format is making it more difficult to visually parse the difference.

Example, deeply nested

This is not helpful.
screen shot 2015-10-24 at 5 18 35 pm

Example, large object

Helpful, but not usable.
screen shot 2015-10-24 at 5 18 50 pm

Example, JSON.stringify

Not usable, and I wasn't expecting all of the quotes to be \"-escaped because they aren't escaped in the original string.
screen shot 2015-10-24 at 5 34 13 pm

Suggestion

Highlight the differences in objects with a package like difflet.

difflet_colors

Or like this
difflet_object_comments

@dylang
Copy link
Author

dylang commented Oct 24, 2015

Closing in favor of twada/power-assert-renderers#1 since that's what AVA seems to be using.

@dylang dylang closed this as completed Oct 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant