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

Test coverage for commands #49

Open
stephenyeargin opened this issue Sep 17, 2015 · 2 comments
Open

Test coverage for commands #49

stephenyeargin opened this issue Sep 17, 2015 · 2 comments

Comments

@stephenyeargin
Copy link
Member

This package is getting a bit unwieldy with new commands and lacks spec coverage. As important as it is to a lot of folks using it, it would be worthwhile to investigate getting a mocking layer between the package script and the PagerDuty API so we can run a more robust test suite than "does our regex match?"

@rick has done some pretty solid work with getting a graph-me clone testable. We may be able to borrow some ideas from there: https://github.com/rick/hubot-graphme/blob/master/test/graph-me_test.coffee

@technicalpickles
Copy link
Contributor

Totally agree. This script has grown a lot over time, and could use some cleanups in general. I think it'd be worthwhile to extract the PagerDuty API integration out of this, and then use stubs for testing like you said.

@technicalpickles
Copy link
Contributor

https://github.com/poetic/nock-vcr-recorder might be useful for testing the API interactions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants