You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling expectJSON('key1.key2', 'value1'), is not possible, as the second argument value1 is not an object.
expectContainsJSON could be used as an alternative, however, its syntax isn't as concise especially with more complex JSON structures, and the error messages are much more vague as we're checking that a structure contains another. It would be nice to have something that gets to the point by strictly comparing a string at a given path with an expected string.
Support for this could either be implemented in expectJSON itself or as a separate helper function.
When calling
expectJSON
with the optionalpath
argument, you can't specify a string as thejsonTest
parameter.Example response:
Calling
expectJSON('key1.key2', 'value1')
, is not possible, as the second argumentvalue1
is not an object.expectContainsJSON
could be used as an alternative, however, its syntax isn't as concise especially with more complex JSON structures, and the error messages are much more vague as we're checking that a structure contains another. It would be nice to have something that gets to the point by strictly comparing a string at a given path with an expected string.Support for this could either be implemented in
expectJSON
itself or as a separate helper function.See the discussions here for more context.
Cheers,
Pyves
The text was updated successfully, but these errors were encountered: