Ensure git operations preserve their stderr in error output#47
Merged
Ensure git operations preserve their stderr in error output#47
Conversation
This also provides a SetPrepareCmd hook for tests to be able to define stubs for commands that are supposed to be run
We are now able to assert that the browse command was called with the correct URL
vilmibm
approved these changes
Nov 6, 2019
Contributor
vilmibm
left a comment
There was a problem hiding this comment.
I'm guessing we should use this testing approach instead of the TestHelperProcess thing I put in the pr-create branch?
Contributor
Author
|
@vilmibm This might be an easier way to quickly stub output from one command e.g. |
vilmibm
pushed a commit
that referenced
this pull request
Jun 29, 2021
Updated browse tests for Test_runBrowse and TestNewCmdBrowse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This, for instance, ensures that running a
ghcommand outside of a git repository will include the following error when trying to access a git repository:Previously, the output was just
exit status 128, which wasn't enough to determine the cause of the failure.This also provides a SetPrepareCmd hook for tests to be able to define stubs for commands that are supposed to be run.
The SetPrepareCmd hook us then used to spy on OpenInBrowser, so that we don't have to maintain a separate mechanism for testing that URLs were opened in a browser.