Documentation and assert.equals error message still reference deprecated (removed) defined assertion
- library version : 4.0.0
- Environment : Node 13.5.0
- Example URL : https://sinonjs.github.io/referee/#defined
- Other libraries you are using: Mocha 7.0.0
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)
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?
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 :)
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 :)
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?