-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add output channel into internal commands #798
Conversation
|
||
this.registerCommand(AvailableCommands.SHOW_OUTPUT_CHANNEL, () => | ||
outputChannel.show() | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] This is a placeholder. The plan is to actually move registerInstrumentedCommand
into this class and then have it show a toast error which gives the option to reveal the output channel instead of the throwing another error.
@@ -0,0 +1,98 @@ | |||
import { spy, stub } from 'sinon' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] These are super gross that is why I held off implementing them, if you get a problem crop up in these complicated utils then you can get into all sorts of trouble trying to debug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the utils' source is gross, I think it'll be better to have these reusable functions that have all the gross mock logic in one place over spreading everything out and re-creating the mocks slightly differently each time. Thanks for taking this on!
@@ -22,20 +23,29 @@ suite('Repository Test Suite', () => { | |||
disposable.dispose() | |||
}) | |||
|
|||
const buildRepository = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] This is only required in this file, hence I didn't pull it into a util.
@@ -23,6 +23,10 @@ export class OutputChannel { | |||
}) | |||
} | |||
|
|||
public show() { | |||
return this.outputChannel.show(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] This is why we are making this change.
Code Climate has analyzed commit 85ef140 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 95.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.0% (0.0% change). View more on Code Climate. |
This PR gets a lot of the grunt work out of the way to address #795 and specifically this comment.
I took the opportunity to pull out some heavy lifting builder util. LMK what you think.