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

Add Tests #67

Open
eddiemonge opened this issue May 15, 2014 · 5 comments
Open

Add Tests #67

eddiemonge opened this issue May 15, 2014 · 5 comments

Comments

@eddiemonge
Copy link
Collaborator

Need to add tests to verify functionality. Open to suggestions on how to do this. Mostly looking for a way to mock the git calls.

@ruyadorno
Copy link

Hi @eddiemonge, I'm stopping by just to say that I had done some tests on my grunt plugin that uses git commands in a very similar way they are used here on grunt-bump (in fact my plugin extends grunt-bump to provide a more gitflow-oriented release system).

If you want to take a look at the tests it might give you some ideas. What I also did there was break the entire task in smaller modules/functions that can be easily tested.

I might also be doing some big mistake there, so please let me know if you spot any ;)

@eddiemonge
Copy link
Collaborator Author

Thats similar to the rewrite im doing for this:

  • Break up into smaller tasks and grunt-bump becomes a customizable workflow
  • Change to using node-git so it can be mocked/tested better

@ruyadorno
Copy link

Sounds great! Let me know if there is anything I can help with.

@ZuBB
Copy link

ZuBB commented Sep 11, 2014

Change to using node-git so it can be mocked/tested better

node-git is quite heavy package/dependency (compared to plugin itself). It tries to provide API for all git commands. And you plugin needs couple git commands with pretty stable set of options.

Its acceptable to use node-git as dep when we writing a js-based git client. But here its usage will be an overhead

Just my 5c.

swenzel pushed a commit to swenzel/grunt-bump that referenced this issue Jan 23, 2015
Tests for the dry run feature.
With minor changes this could also be used for testing other features.

May resolve vojtajina#67
@eddiemonge
Copy link
Collaborator Author

@ZuBB I agree. If a simple mocked out git could be used that would be better

swenzel pushed a commit to swenzel/grunt-bump that referenced this issue Jan 29, 2015
Tests for the dry run feature.
With minor changes this could also be used for testing other features.

May resolve vojtajina#67
swenzel pushed a commit to swenzel/grunt-bump that referenced this issue Jan 29, 2015
Tests for the dry run feature.
With minor changes this could also be used for testing other features.

May resolve vojtajina#67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants