-
Notifications
You must be signed in to change notification settings - Fork 14
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
I was expecting to expect 2 arrays of objects to be the same, but they're not #57
Comments
@JimBarrows It doesn't look like chai-things supports what you're trying to do. The [4, 11, 15].should.all.be.below(20); // Tests that each element in the array is below 20. The good news is that in the upcoming Chai v4, the Here's how it'd look with base Chai v4: expect([{
__v: 0,
name: 'First one',
owner: "582a4aac593bdac822a535b6",
_id: "582a4aad593bdac822a535b7",
size: 0,
cards: []
},
{
__v: 0,
name: 'SecondOne',
owner: "582a4aac593bdac822a535b6",
_id: "582a4aad593bdac822a535b8",
size: 0,
cards: []
}
]).to.have.deep.members([
{
_id: '582a4aad593bdac822a535b7',
name: 'First one',
owner: '582a4aac593bdac822a535b6',
__v: 0,
size: 0,
cards: []
},
{
_id: '582a4aad593bdac822a535b8',
name: 'SecondOne',
owner: '582a4aac593bdac822a535b6',
__v: 0,
size: 0,
cards: []
}
]); |
I was expecting this to return true. The only difference I can see is that the fields are in a different order. Is there something I'm missing?
The text was updated successfully, but these errors were encountered: