Skip to content
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

Documentation and assert.equals error message still reference deprecated (removed) defined assertion #184

Open
gundelsby opened this issue Feb 21, 2020 · 4 comments

Comments

@gundelsby
Copy link
Contributor

What did you expect to happen?
Documentation should be up to date.
Error messages from assertions should be accurate.

What actually happens
Documentation still lists the predefined assert defined, and not isUndefined.
Error message from predefined assert equals gives the following error message if the expectiation value is undefined:

AssertionError: [assert.equals] Expectation for equals should not be undefined. Use assert.defined or refute.defined instead.

How to reproduce
assert.equals('not undefined', undefined)

@mroderick
Copy link
Member

mroderick commented Feb 21, 2020

Thank you for reporting this issue! That would require few changes to fix.

The new assertion is called assert.isUndefined.

Would you like to make a PR to fix it?

@gundelsby
Copy link
Contributor Author

I could, but since I've never made a contribution to this project before it probably will take some time. Guess there's no rush if I'm the only one complaining on a change that's over a year old though :)

@mroderick
Copy link
Member

This would be the line to change: https://github.com/sinonjs/referee/blob/master/lib/assertions/equals.js#L19

I ran into this myself not long ago :)

@gundelsby
Copy link
Contributor Author

I noticed while doing the PR that even though the docs in the repo has been updated, the website (https://sinonjs.github.io/referee) still shows what I assume is an old version. So I guess that needs to be updated too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants