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: mock git for some tests to improve code coverage #33

Merged
merged 1 commit into from
May 6, 2016

Conversation

nexdrew
Copy link
Member

@nexdrew nexdrew commented May 2, 2016

Mocks git (for a subset of tests) in order to better test:

  • --sign attempts to sign the commit and tag
  • exits with error if git commit fails
  • exits with error if git tag fails

This improves code/line coverage from 91.57 to 95.18 percent.

Still need a way to induce/mock error scenarios for conventionalRecommendedBump and conventionalChangelog.

@coveralls
Copy link

coveralls commented May 2, 2016

Coverage Status

Coverage increased (+3.6%) to 95.181% when pulling b919f56 on nexdrew:better-sign-test into b6b2a75 on conventional-changelog:master.

@stevemao
Copy link
Member

stevemao commented May 6, 2016

Wow this is interesting :) Can definitely be refactored into a module :)

@nexdrew nexdrew deleted the better-sign-test branch May 6, 2016 13:13
@nexdrew
Copy link
Member Author

nexdrew commented May 6, 2016

@stevemao Hmm, not a bad idea, thanks!

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

Successfully merging this pull request may close these issues.

4 participants