feat: add thermal states to powerMonitor (#37935)

* feat: add thermal states to powerMonitor

* update docs
This commit is contained in:
Jeremy Rose 2023-04-19 02:46:55 -07:00 committed by GitHub
parent b2411e05a8
commit ba835ddac1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 93 additions and 2 deletions

View file

@ -178,6 +178,12 @@ describe('powerMonitor', () => {
});
});
describe('powerMonitor.getCurrentThermalState', () => {
it('returns a valid state', () => {
expect(powerMonitor.getCurrentThermalState()).to.be.oneOf(['unknown', 'nominal', 'fair', 'serious', 'critical']);
});
});
describe('powerMonitor.onBatteryPower', () => {
it('returns a boolean', () => {
expect(powerMonitor.onBatteryPower).to.be.a('boolean');