Repository navigation
Adds function to return last stash entry created for a branch - #7089
iAmWillShepherd wants to merge 24 commits into
Conversation
shiftkey
left a comment
There was a problem hiding this comment.
Some initial feedback, mostly around documenting things
|
As #7032 has been merged I changed the base branch back to |
|
|
||
| async function stash(repository: Repository, message?: string) { | ||
| const tipSha = await getTipSha(repository) | ||
| it('returns null when no stash entries exist for branch', async () => { |
There was a problem hiding this comment.
What about a test when no stashes are created in the repository?
There was a problem hiding this comment.
The function operates at the branch level, so I don't think testing for stashes in a repo would give us much. I've updated the name of the function to make its purpose more clear.
There was a problem hiding this comment.
I wasn't that worried about the function name, given it's parameterized accordingly - I just didn't quite understand this test summary versus the implementation.
What about this test description for the current test:
returns null when no stash entries match branch name
This might then motivate creating an additional test to cover a related scenario
returns null when no stash entries created
There was a problem hiding this comment.
The function operates at the branch level, so I don't think testing for stashes in a repo would give us much.
This might be correct, but we also don't have a test for getDesktopStashEntries to ensure it handles when no stashes exist. We only cover "unborn repository" and "returns created stashes". That's the gap I'd like to cover here.
|
I'm going to drop |
|
Closing in favor of #7182. |
Adds a function that returns the last entry created for a given branch.
See tracking issue: #6987