|
@@ -16,8 +16,7 @@ chai.use(dirtyChai)
|
|
|
|
|
|
const skip = process.platform !== 'linux' || !process.env.DBUS_SYSTEM_BUS_ADDRESS
|
|
|
|
|
|
-// TODO(alexeykuzmin): [Ch66] Crashes on Linux ia32. Fix it and enable back.
|
|
|
-xdescribe('powerMonitor', () => {
|
|
|
+describe('powerMonitor', () => {
|
|
|
let logindMock, dbusMockPowerMonitor, getCalls, emitSignal, reset
|
|
|
|
|
|
if (!skip) {
|
|
@@ -31,7 +30,9 @@ xdescribe('powerMonitor', () => {
|
|
|
reset = Promise.promisify(logindMock.Reset, {context: logindMock})
|
|
|
})
|
|
|
|
|
|
- after(reset)
|
|
|
+ after(async () => {
|
|
|
+ await reset()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
(skip ? describe.skip : describe)('when powerMonitor module is loaded with dbus mock', () => {
|
|
@@ -130,7 +131,7 @@ xdescribe('powerMonitor', () => {
|
|
|
describe('powerMonitor.querySystemIdleState', () => {
|
|
|
it('notify current system idle state', done => {
|
|
|
powerMonitor.querySystemIdleState(1, idleState => {
|
|
|
- expect(idleState).to.be.true()
|
|
|
+ expect(idleState).to.equal('idle')
|
|
|
done()
|
|
|
})
|
|
|
})
|