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
scenario: expect(testee).toMatchObject(reference);
testee = {a:1,b:2,c:3} reference = {a:1,b:2} will not succeed
testee = {a:1,b:2} reference = {a:1,b:2,c:3} will succeed
Is this behaviour a bug or a feature? In my use case, I want to get "not successful" in both cases
The text was updated successfully, but these errors were encountered:
This works as intended, toMatchObject is a loose comparison:
toMatchObject
const more = { a: 1, b: 2, c: 3 }; const less = { a: 1, b: 2 }; expect(more).toMatchObject(more); expect(less).toMatchObject(less); expect(more).toMatchObject(less); expect(less).not.toMatchObject(more);
Sorry, something went wrong.
No branches or pull requests
scenario:
expect(testee).toMatchObject(reference);
testee = {a:1,b:2,c:3}
reference = {a:1,b:2}
will not succeed
testee = {a:1,b:2}
reference = {a:1,b:2,c:3}
will succeed
Is this behaviour a bug or a feature?
In my use case, I want to get "not successful" in both cases
The text was updated successfully, but these errors were encountered: