app.setBadgeCount should return boolean
This commit is contained in:
parent
f8ec377123
commit
1da2a1c2ae
6 changed files with 24 additions and 11 deletions
|
@ -285,10 +285,17 @@ describe('app module', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('app.getBadgeCount API', function () {
|
||||
describe('app.setBadgeCount API', function () {
|
||||
const shouldFail = process.platform === 'win32' ||
|
||||
(process.platform === 'linux' && app.isUnityRunning())
|
||||
|
||||
it('returns false when failed', function () {
|
||||
assert.equal(app.setBadgeCount(42), !shouldFail)
|
||||
})
|
||||
|
||||
it('should set a badge count', function () {
|
||||
app.setBadgeCount(42)
|
||||
assert.equal(app.getBadgeCount(), 42)
|
||||
assert.equal(app.getBadgeCount(), shouldFail ? 0 : 42)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue