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

Attempt to dump offending objects in assert_array_equals and assert_object_equals #7179

Open
wpt-issue-mover opened this issue Aug 31, 2017 · 1 comment

Comments

@wpt-issue-mover
Copy link

Originally posted as w3c/testharness.js#227 by @pwnall on 19 Dec 2016, 20:58 UTC:

Both assert_array_equals and assert_object_equals check their arguments piece by piece (element by element / property by property). This approach is sufficient when the assertions pass, but has a side-effect that when the assertions fail, we get sub-optimal debugging information.

Please consider building the assertion failure messages for these two functions in a more deliberate way. For example, when comparing two arrays, I'd like to see their elements in a JSON-like output (bonus points for GitHub-like diff highlighting).

Solving this issue would make it easier to use WPT to understand the differences in browser behaviors, and to debug & fix interoperability issues. Thank you very much!

@annevk
Copy link
Member

annevk commented Jan 9, 2020

I landed a fix for assert_array_equals (with lots of help from @jgraham). assert_object_equals is best not used and we want to redo/remove it as per #2033 so I think this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants