Open Bhupesh-V opened 3 years ago
@Bhupesh-V I'd like to work on this.
Do you have something in mind that we could use as a baseline?
@Bhupesh-V I'd like to work on this.
Do you have something in mind that we could use as a baseline?
Hey have been doing some research, seems like there is lot to think about. The fundamental problem to figure out is how do we mock the execution of fzf
command in bats. Since its deeply integrated within ugit.
Another tool I tried using was shellspec for testing, but as it turns out it doesn't support testing colored output. Ref: https://github.com/shellspec/shellspec/issues/278
Not really sure how to proceed further at the moment. If you are able to find something, do let me know in the thread.
Another tool I tried using was shellspec for testing, but as it turns out it doesn't support testing colored output. Ref: https://github.com/shellspec/shellspec/issues/278
See my answer on that issue...
The solution to make it work is to use custom matchers.
Ever wrote tests for a script? We need to use bats Check out projects using bats for examples
Since this is a weird use case, we need to figure out what things to test or not. Suggestions are welcome