-
Notifications
You must be signed in to change notification settings - Fork 473
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
Use require.JSONEq instead of require.Equal for the JSON string #2100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least in some test cases, we need to validate the indent and spaces of the output JSON. And JSONEq
will just ignore all of them.
For exmaple, all cases in JSON.GET with options
.
Thank you, I fixed it. |
Quality Gate passedIssues Measures |
…apache#2100) Co-authored-by: hulk <hulk.website@gmail.com>
I have used
require.JSONEq
instead ofrequire.Equal
for the JSON string.We don't need to test the order of the elements in the JSON.