-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(git-brv): add unit test #1131
Comments
Sorry for the late, and I will switch the |
@vanpipy What do you think about Bats? It's much more popular and more maintained (last release was in 2024 instead of shellspec's 2021). I'm really not personally a fan of shellspec's BDD-style tests, which I find hard to read and might discourage new contributors from adding to it. For code coverage for Bats, it looks like bashcov can be helpful. To be honest, I have kind of been avoiding the pytest stuff in this repository because I had a difficult time working with it and reading it (compared to Bats). That made me wish I pushed for using Bats for testing a little harder. If you are okay with switching to Bats (instead of shellspec) I would be able to help set things up! I've used Bats for dozens of projects so it's kind of like second-nature to me. cc @spacewander |
I will vote for Bats too. It is used more widely. |
Yes, it is great one, i forget the starred one. It is the one choice i try to test. bashcov it good for git-extras, but i took an error start point.. thanks a lot.
Great, many thanks for this again. I think there is still a seperated test directory for the all unit tests. I will to do the research about the Bats together! I think there are some concerns here,
I have the answer for 1, but cannot answer the 2 and 3 even i review the bats document. |
@vanpipy Yes, there is still a separate test directory for all unit tests! About your concerns:
I created a quick scaffold of what using Bats may look like for this project in this draft PR: #1170. I tried to add as many comments as possible explaining things. After reading the comments and Bats documentation, if you still have any other questions, let me know! |
File
git-brv
Testcases
main
, when invoke thegit-brv
command, the format of the result is{date} {branch_name} {upstream} {branch_short_hash} {commit_title_message}
and output is just like2024-01-05 main origin/main b54d8c7 test(git-browse): add unit tests (#1127)
feature/2024-01-01
,feature/2024-01-02
,feature/2024-01-03
and suppose the branches created date are same to the branch name, when invoke thegit-brv
command, the result isgit-brv
with--reverse
argument, the result isPS: It is a curious command, but I am more curious about the command name, what is the full name of the
git-brv
? Thebrv
is not easy to explain the thing done with it.Reference
The text was updated successfully, but these errors were encountered: