feat: add powerMonitor.onBatteryPower (#26494)
This commit is contained in:
parent
8594b55dee
commit
a9924e1c32
4 changed files with 38 additions and 2 deletions
|
@ -167,10 +167,17 @@ describe('powerMonitor', () => {
|
|||
});
|
||||
|
||||
describe('powerMonitor.getSystemIdleTime', () => {
|
||||
it('notify current system idle time', () => {
|
||||
it('returns current system idle time', () => {
|
||||
const idleTime = powerMonitor.getSystemIdleTime();
|
||||
expect(idleTime).to.be.at.least(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('powerMonitor.onBatteryPower', () => {
|
||||
it('returns a boolean', () => {
|
||||
expect(powerMonitor.onBatteryPower).to.be.a('boolean');
|
||||
expect(powerMonitor.isOnBatteryPower()).to.be.a('boolean');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue