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

Improve Error message for the countEquals predicate #195

Closed
fabricereix opened this issue Jun 10, 2021 · 0 comments · Fixed by #197
Closed

Improve Error message for the countEquals predicate #195

fabricereix opened this issue Jun 10, 2021 · 0 comments · Fixed by #197
Labels
enhancement New feature or request
Milestone

Comments

@fabricereix
Copy link
Collaborator

Currently, the countEquals predicate produces error messages such as:

jsonpath "$.value1" countEquals 4
   actual:   string <hello>
   expected: count equals to <4>
   >>> types between actual and expected are not consistent

jsonpath "$.value2" countEquals 4
   actual: [object, object, object, object, object]
   expected: count equals to <4>

For the latest case where the type returned by the query is valid, namely a collection,
the error message could be improved as follows:

jsonpath "$.value2" countEquals 4
   actual: 5
   expected: 4
@fabricereix fabricereix added the enhancement New feature or request label Jun 10, 2021
@fabricereix fabricereix linked a pull request Jun 11, 2021 that will close this issue
@lepapareil lepapareil added this to the 1.3.0 milestone Jun 11, 2021
@lepapareil lepapareil removed the 1.3.0 label Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants