Update shell.openExternal to promise due to electron update on atom #2625
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2625 +/- ##
==========================================
+ Coverage 93.45% 93.46% +0.01%
==========================================
Files 237 237
Lines 13234 13215 -19
Branches 1906 1900 -6
==========================================
- Hits 12368 12352 -16
+ Misses 866 863 -3
Continue to review full report at Codecov.
|
ecf308b
to
d08bb7b
|
Hmm CodeCov is complaining about these... they must not be covered by existing tests. I think that's probably not worth addressing here, though, because these methods don't do anything but call two other functions that we'd need to stub anyway. |
|
Looks like we'll need to update the stubbing in some tests, too. |
5e165e6
to
9678921
|
|
| @@ -90,15 +90,15 @@ describe('IssueishListController', function() { | |||
|
|
|||
| it('calls shell.openExternal with specified url', async function() { | |||
| const wrapper = shallow(buildApp()); | |||
| sinon.stub(shell, 'openExternal').callsArg(2); | |||
| sinon.stub(shell, 'openExternal').callsFake(() => { }); | |||
smashwilson
Feb 12, 2021
Member
I think these could also be .returns(Promise.resolve()). No big deal though.
I think these could also be .returns(Promise.resolve()). No big deal though.
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.


Requirements
Description of the Change
There are some Electron APIs that changed to only return Promises (and not run callbacks passed to them), mostly as of Electron 7+. Updating to be compatible with those would be great for updating Atom's Electron version.
Screenshot or Gif
Applicable Issues
#2624