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

Expose client for testing stub-ability #286

Closed
wants to merge 2 commits into from
Closed

Conversation

fyockm
Copy link

@fyockm fyockm commented Sep 2, 2016

also ternary FTW

@thinkingserious
Copy link
Contributor

@fyockm,

Awesome! Could you please take a moment to sign our CLA so I can merge this? https://github.com/sendgrid/sendgrid-nodejs/blob/master/CONTRIBUTING.md#cla

Thanks!

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap status: cla needed and removed status: cla needed labels Sep 2, 2016
@thinkingserious
Copy link
Contributor

Hi @fyockm,

This one finally came up to the top of our queue. Could you please repair the conflicts and I'll go ahead and merge it.

To test this locally:

  1. Download https://stoplight.io/prism/
  2. ./prism run --mock --list --spec https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json
  3. mocha

@thinkingserious
Copy link
Contributor

@fyockm,

Just check in :)

@fyockm
Copy link
Author

fyockm commented Sep 28, 2016

@thinkingserious I updated my branch. All tests pass locally.

#277 actually exposed the client already. So, this PR boils down to a more terse (though potentially less readable?) ternary expression around Promise. At this point, very little value added in my opinion. Feel free to merge or close.

@peteyycz
Copy link

peteyycz commented Oct 5, 2016

@fyockm where does #277 expose the client? Your way is much clearer and it makes stubbing a lot easier, which is currently not doable.

Could you please update this branch because right now the library is untestable without modifications.

@thinkingserious
Copy link
Contributor

@adamreisnz,

Does your version solve this issue?

@adamreisnz
Copy link
Contributor

adamreisnz commented Apr 13, 2017 via email

@thinkingserious
Copy link
Contributor

This issue will be resolved with: #378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants