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

aria.utils.Json.diff and update to the Assert.assertJsonEquals method #1706

Merged
merged 13 commits into from Feb 23, 2017

Conversation

Projects
None yet
2 participants
@tjw02
Contributor

tjw02 commented Oct 8, 2016

Hi, I would like to propose this change. The issue that this is trying to address is when using the this.assertJsonEquals method in the attester test cases, if the objects are large, then the output is very difficult to debug, as the entire objects are printed out. With this change, only the differences between the objects will be logged, meaning easier debugging. How this has been done is to add a new generic diff method to aria.utils.Json (with test cases provided, and detailed comments on this method), and then to update the Assert.js' assertJsonEquals method to use it.

tjw02 added some commits Oct 8, 2016

Hi, I would like to propose this change. The issue that this is tryin…
…g to address is when using the this.assertJsonEquals method in the attester test cases, if the objects are large, then the output is very difficult to debug, as the entire objects are printed out. With this change, only the differences between the objects will be logged, meaning easier debugging. How this has been done is to add a new generic diff method to aria.utils.Json (with test cases provided, and detailed comments on this method), and then to update the Assert.js' assertJsonEquals method to use it.
Rewrite the Json.diff method so that it doesn't copy the whole object…
…s but only copy the differences for performance improvements
This is a change in the API for the diff method. Now it is called equ…
…alsDiff and it will return a more complex result object with an equals flag, the left and right differences

@divdavem divdavem merged commit 97f1dbd into ariatemplates:master Feb 23, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@divdavem divdavem added this to the 1.8.3 milestone Mar 17, 2017

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