refactor: make shell.OpenExternal async (#17135)

This commit is contained in:
Shelley Vohr 2019-05-03 13:53:45 -07:00 committed by GitHub
parent 0755857a0c
commit 6d96f30ed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 70 additions and 140 deletions

View file

@ -36,7 +36,7 @@ describe('shell module', () => {
}
})
it('opens an external link asynchronously', done => {
it('opens an external link', done => {
const url = 'http://www.example.com'
if (process.platform === 'linux') {
process.env.BROWSER = '/bin/true'
@ -46,18 +46,6 @@ describe('shell module', () => {
shell.openExternal(url).then(() => done())
})
it('opens an external link synchronously', () => {
const url = 'http://www.example.com'
if (process.platform === 'linux') {
process.env.DE = 'generic'
process.env.DE = '/bin/true'
process.env.DISPLAY = ''
}
const success = shell.openExternalSync(url)
assert.strictEqual(true, success)
})
})
describe('shell.readShortcutLink(shortcutPath)', () => {