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 unit tests for the contribution system #110
Comments
This is what I got so far, it's pretty basic, it's testing (load-file "../init.el")
(ert-deftest git-has-remote ()
(should (equal (spacemacs/git-has-remote "clearly-not-a-R3M0T3!") nil))
(should (numberp (spacemacs/git-has-remote "origin")))) I've got some questions, to see if I'm headed in the correct way:
Sorry if all of this seems trivial, I have zero experience in testing Emacs Lisp :b |
@lazywithclass We are on the same boat, I've never done unit testing in elisp so I need practice like you.
I'm for small and incremental PRs. |
@syl20bnr I wrote a couple more tests for I am not submitting a PR because I feel like it's just a first draft and would really like some feedback from you. Do you think I'm headed in the right direction? |
@lazywithclass I looked at it and it is a very good beginning. The necessary modifications for your test file are in this gist: https://gist.github.com/syl20bnr/96fd26431dc77aed5996 Also if you want to put your email in the file header. Thank you for bootstrapping the tests, I did not have enough motivation to start them ahah Note: Travis build is broken until you submit your PR. |
@syl20bnr I will move to a new house in this weekend, it will be really intense :D! I will do my best to have it done by tonight since the build is broken. Thank you for putting my name in the header; it's a pleasure to help. |
@lazywithclass Don't worry about spacemacs. I'll just fix the makefile for now. |
@syl20bnr Just to be clear: those tests for new contributions, what are their goals? New functionality in new contributions should be covered by it's own tests, written by contributor (in ideal world). Do you mean a set of regression tests checking that new contribution doesn't break existing feature set? Then it looks more like automatic runnable Spacemacs specification, a bit larger in scope than "unit tests for contribution system". :) |
I'm fine with the current unit tests although the coverage is pretty low, the foundation is enough tested to be able to reliably reason about the higher level algorithms. |
Much needed :-)
The text was updated successfully, but these errors were encountered: