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 @NullVoxPopuli!
Thanks for putting these together!
Have you considered fuzzy object match similar to what Sinon.js provides?
E.g. sometimes you need to match two objects and you care about one or two or three props but other props are out of concern for the test.
Currently, you can't use assert.deepEqual() as it will compare all props and it's achievable via something like:
assert.deepEqual()
const { foo, bar } = myObject.someMethod(); assert.equal(foo, 'foo value'); assert.equal(bar, 'bar value');
would be nice to do something like:
const result = myObject.someMethod(); assert.fuzzyEqual(result, { foo: 'foo value', bar: 'bar value' });
where result might contain few more props that we don't care in this test.
result
The text was updated successfully, but these errors were encountered:
ooo, that'd be cool. Def useful. @SergeAstapov, want to open a PR? :)
Sorry, something went wrong.
No branches or pull requests
Hi @NullVoxPopuli!
Thanks for putting these together!
Have you considered fuzzy object match similar to what Sinon.js provides?
E.g. sometimes you need to match two objects and you care about one or two or three props but other props are out of concern for the test.
Currently, you can't use
assert.deepEqual()
as it will compare all props and it's achievable via something like:would be nice to do something like:
where
result
might contain few more props that we don't care in this test.The text was updated successfully, but these errors were encountered: