-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
Nested Property Chainability #1128
Comments
@jakemingolla Yup, it's intended behavior. One alternative (other than breaking your assertion into multiple assertions) is to use expect(bar).to.deep.nested.include({
'baz.first': [1, 2, 3],
'baz.second': 'Hello!',
}); |
@meeber Thanks, that makes sense. It would be cool if the target value was dependent on the context of the chained command (i.e. |
We've discussed this before in a few flavours (the general issue being "flags are permanent"), most recent of which is #785 |
We're using Chai 5 as an opportunity to re-evaluate all decisions, including the chaining one. It's very likely we'll come up with something that can fill this gap. Probably by dropping chaining and implementing something in the shape of what #644 describes. |
The chaining of
.nested.property
using.and
does not follow what I would expect compared to other expectations:Unless I am misreading the documentation, it would appear that nested property expectations return the actual value at that field rather than the original object. Is this intended?
The text was updated successfully, but these errors were encountered: