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
Add unit tests for Connector class add in pull request #444
Add unit tests for Connector class add in pull request #444
Conversation
@arthurschreiber This is a pull request for unit tests for the Connector class as we discussed in - #362. Please take a look. |
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.
Can you convert test/unit/connector-test.coffee
to javascript (ES2015)? New files should not use CoffeeScript to make the transition away from it a bit easier.
Converted connector-test.coffee to JavaScript. eslint is passing, so I hope it's ES2015 :) |
@tvrprasad The tests are not passing on my machine, even tho the CI runs are all green:
|
I think this is because the tests actually try to connect to the remote servers - so when running the tests on a machine that does not have network connectivity, they fail. 😞 |
Correct. These tests will fail on a machine without network connectivity. They depend on being able to access some high availability sites like google.com, bing.com etc. Not ok? I updated the tests to rely only on being able to access loopback addresses, 127.0.0.1 and ::1. So they won't need internet access anymore. You do need IPv6 loopback address enabled on your machine though. Please checkout the updated PR. Thanks. |
@arthurschreiber |
tediousjs#362 Add dependency on Sinon npm package for unit testing. Fix bugs in Connector class identified by the unit tests.
This allows the unit tests to pass without internet connectivity.
5dae53f
to
51f5844
Compare
Did a rebase and resolved merge conflicts to sit on top #362. Aside. I had to do a 'git push -f' to get my changes through. Is there a better way? |
Hi, @tvrprasad @arthurschreiber any update here as one month passed? The new release is pending on this PR. |
This PR is currently waiting on @arthurschreiber to find some time to make a pass and merge or suggest changes. |
Closing this as I added a bunch of other tests using Thank you for the work on these - I really appreciate the time spent on this, even if they didn't make it in. |
#362
Add dependency on Sinon npm package for unit testing.
Fix bugs in Connector class identified by the unit tests.