-
Notifications
You must be signed in to change notification settings - Fork 627
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
Added code coverage and HighLevelProducer tests. #422
Added code coverage and HighLevelProducer tests. #422
Conversation
@@ -18,7 +18,7 @@ describe('Client', function () { | |||
before(function () { | |||
zk = new FakeZookeeper(); | |||
|
|||
Client = proxyquire('../lib/Client', { | |||
Client = proxyquire('../lib/client.js', { |
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.
should be able to omit the .js
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.
You are right @hyperlink - I amended the commit and verified the build is still successful on Travis: https://travis-ci.org/lightswitch05/kafka-node/builds/148936864
782222b
to
1116e0a
Compare
Thanks for the PR @lightswitch05! I was thinking since one of the HLP's key feature is the automatic partitioning of messages maybe we can update the test to verify messages are produced to different partitions. I was thinking we can specify a |
Thanks for merging! I can definitely look into adding that extra test for |
I agree that adding coveralls would be a good idea. |
Yeah, lets do it! Just need to get @haio to activate it (or make me admin?) |
Added in #432 |
I added code coverage using istanbul. My tests were failing on Travis, after some research I found it was due to some changes with NPMv3 and peer dependencies with
eslint-config-semistandard
. After getting that working, I sawHighLevelProducer
was in sore need of some tests, so I added those. They are pretty much the same test asProducer
. Testing my changes some more with Travis I saw that proxyquire was not working, I changed the module require to a file to fix it.I would be happy to add integration with https://coveralls.io/ if there is any interest to have that level of code coverage information with pull requests. It would require the project owner to allow integration with the account.
Summary: Added code coverage. Added unit tests. Fixed tests on travis.