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

Fix tests (#18) and mocking NCBI API #21

Merged
merged 8 commits into from
Apr 9, 2017
Merged

Fix tests (#18) and mocking NCBI API #21

merged 8 commits into from
Apr 9, 2017

Conversation

bmpvieira
Copy link
Member

Tests should no longer break often due to NCBI changes and we can once in a while update the mock data automatically to make sure our code is still relevant.

This allows to record http request response into fixtures files
and later use those to mock the external API (NCBI) so that tests
don't break all the time due to NCBI side changes rather than ours
@bmpvieira bmpvieira requested a review from thejmazz April 6, 2017 23:36
@bmpvieira bmpvieira self-assigned this Apr 6, 2017
@bmpvieira bmpvieira force-pushed the development branch 2 times, most recently from 9c1c852 to 9a38f26 Compare April 7, 2017 01:12
@bmpvieira bmpvieira requested review from IsmailM and removed request for thejmazz April 7, 2017 08:47
cli.js Outdated
@@ -46,8 +46,8 @@ if (command === 'link') {
var arg2 = argv._[2]
var arg3 = argv._[3]
} else {
var arg2 = argv._.slice(2).join(' ')
var arg3 = null
arg2 = argv._.slice(2).join(' ')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These variables aren't declared if command !== 'link'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are declared because JavaScript doesn't have block scope, only function scope, so they get hoisted. However, this might be confusing so I'll fix it. Thanks for noticing it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bmpvieira bmpvieira merged commit 096fec8 into master Apr 9, 2017
@bmpvieira bmpvieira deleted the development branch April 9, 2017 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants