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
.expect('jsonTypes', '*', {})
does not allow an empty array
#462
Comments
.expect('jsonTypes', '*', {})
does not an empty array.expect('jsonTypes', '*', {})
does not allow an empty array
The error message could be improved, but technically the test is not wrong. There are no objects that exist when you are trying to run assertions on them. Also on a side note: It is usually not a good idea to return an array as the root element in an API response, because you can never change it or add any other keys once it is done. I always return an object with a |
This error message outputs if no object exists in path. format is
|
Hi there. 😸
.expect('jsonTypes', '*', {})
does not allow an empty array. But API which returns array of objects usually returns[]
even when the array has no object.So, I think
.expect('jsonTypes', '*', {})
should allow[]
.what do you think about this?
test code
fyi) my workaround
The text was updated successfully, but these errors were encountered: