feat: allow macOS apps to set activation policies (#21983)
This commit is contained in:
parent
3341a2c3b4
commit
303ca10846
5 changed files with 42 additions and 0 deletions
|
@ -202,6 +202,14 @@ describe('app module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
ifdescribe(process.platform === 'darwin')('app.setActivationPolicy', () => {
|
||||
it('throws an error on invalid application policies', () => {
|
||||
expect(() => {
|
||||
app.setActivationPolicy('terrible' as any)
|
||||
}).to.throw(/Invalid activation policy: must be one of 'regular', 'accessory', or 'prohibited'/)
|
||||
})
|
||||
})
|
||||
|
||||
describe('app.requestSingleInstanceLock', () => {
|
||||
it('prevents the second launch of app', function (done) {
|
||||
this.timeout(120000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue