-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactoring to ease contribution #46
Conversation
Pull Request Test Coverage Report for Build 174
💛 - Coveralls |
Something went wrong in my rebase, so tests are failing. Please hold on review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Epic PR! Thank you for digging into it.
I found one minor thingy so far. Will review again once you figured out the build issue.
You can go ahead with the review, it seems the only failure was reduction in coverage. (I will add a few commits to fix this) |
Looks good to me. Especially nice that you took the time to write documentation for the rather complicated test helper 👍 |
These would be exposed as `assert.isTrue.test`, and would return a Promise. Some research into the git history reveals that this was added for some interal purpose when referee was a major component of busterjs, and used to be called `.internal` sinonjs@6d33cbb This was never documented as part of the public API.
The test should verify the end message, not how many times format was called
This is not used by referee itself
This will help detect when the API changes
fe32f50
to
57bfda4
Compare
Thank you for your review. Brace yourself for more pull requests with test coverage and refactoring |
As stated earlier (#42 (comment)), this is the first PR refactoring referee to make it easier to contribute to.
There is still a ways to go, but this PR is already huge.
I've tried to make it easy to follow by breaking down changes into commits. It may still take a long time to complete the review.
Breaking changes to the public API
I've taken the opportunity to tidy up the public API, and have removed a number of properties that end users should not be using.
This will mean that there are a number of things that we don't need to provide end user documentation for, and won't need to support forever.
In my opinion, it is better to tidy up the API now, before
referee
gets too much traction.Removals:
referee.assert[every assertion].test
- this was an internal artefact frombuster
referee.assert.json.jsonParseExceptionMessage
- not to be used by end usersreferee.assert.exception.*Message
- not to be used by end usersreferee.assert.className.noClassNameMessage
- not to be used by end usersreferee.assert.tagName.noTagNameMessage
- not to be used by end usersreferee.prepareMessage
- not to be used by end usersreferee.format
- not to be used by end usersreferee.assert.match.exceptionMessage
- not to be used by end usersreferee.isArrayLike
- not to be used by end usersreferee.match
- not to be used by end usersHow to verify
npm install
npm test
Checklist for author
npm run lint
passes