Closed matchai closed 5 years ago
Are you stuck on anything in particular here? :blush:
Thanks for asking. 😄 Mostly the tests that I've mentioned in these comments: https://github.com/matchai/spacefish/blob/792ba48382d2ae7ffc5311ebbd9256f51392185e/tests/__sf_section_git_status.test.fish#L120-L123
I was thinking of doing some work on our mock util to allow for more flexible mocks so that we can properly test these (e.g. specifying the command and argument necessary to trigger a mock).
Oh, heh. It might be better to have a checklist in the PR for to-do lists in the future! 😊
And I'd love such an improvement, would make things much easier!
Gah! After all this work rewriting our mocking library, I just realized that we use command git
in the git section, so we can't mock it! 😖
@Snuggle Any ideas as to how we can achieve these test states? I'm considering just merging this in for now. It's definitely a step above what we used to have for git status testing.
I'll just go ahead and merge this in how it is, once I get a review. 😄
Could I ask what this \*
syntax does? Is it globbing a bunch of files in a directory or...?
I'd also like to note that on this line just, cd
, should suffice. It always defaults to home anyways!
https://github.com/matchai/spacefish/blob/74dec4a89b946ee9aa36beca8ac1650a9e3efe1f/tests/__sf_section_dir.test.fish#L31
Be sure to use the handy "No Whitespace" button when reviewing this. The bulk of the diff is really just whitespace changes 😅
I cannot see this button? Are you enrolled in one of the fancy GitHub beta experiments?
Oh haha. I've been using Refined GitHub for so long that I didn't realize that this wasn't a core GitHub feature. 😅 I highly recommend it though!
Description
The git status section has a fair bit of complexity and should probably be tested. In the process of writing these tests, I found a few issues in other existing tests.
Motivation and Context
Improve that test coverage! ⬆️
Types of changes
How Has This Been Tested?
Checklist: