We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi ! :)
I would to test if an object if one of entries from an array containing objects. It's something like: expect({}).to.deep.oneOf([{}, {}, {}])
expect({}).to.deep.oneOf([{}, {}, {}])
But I got this error: AssertionError: expected { Object (type, sender, ...) } to be one of [ Array(3) ]
AssertionError: expected { Object (type, sender, ...) } to be one of [ Array(3) ]
With more details, this is the test with the object and the array:
expect({ "type": "text", "sender": "bot", "user": "USER_TEST", "payload": { "value": "Lorem ipsum" } }).to.deep.oneOf([ { "type": "text", "sender": "bot", "user": "USER_TEST", "payload": { "value": "Dolor sit amet" } }, { "type": "text", "sender": "bot", "user": "USER_TEST", "payload": { "value": "Lorem ipsum" } }, { "type": "text", "sender": "bot", "user": "USER_TEST", "payload": { "value": "Consectetur adipiscing elit" } } ])
How can I do this kind of test ?
The text was updated successfully, but these errors were encountered:
Having the same issue; my example can be simplified straight down to this:
expect([]).to.be.deep.oneOf([[], ''])
Looks like oneOf doesn't check for deep?
oneOf
deep
Sorry, something went wrong.
Is there any update on this?
Successfully merging a pull request may close this issue.
Hi ! :)
I would to test if an object if one of entries from an array containing objects.
It's something like:
expect({}).to.deep.oneOf([{}, {}, {}])
But I got this error:
AssertionError: expected { Object (type, sender, ...) } to be one of [ Array(3) ]
With more details, this is the test with the object and the array:
How can I do this kind of test ?
The text was updated successfully, but these errors were encountered: