Skip to content

Commit

Permalink
Fix test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
cicoub13 committed Jan 30, 2024
1 parent 794f0ae commit 3130826
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/test/lib/scene/actions/scene.action.blinkLights.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ describe('scene.blink-lights', () => {
],
scope,
);
clock.tick(2000);
clock.tick(3200);
assert.calledWithExactly(device.setValue, device, deviceFeature, 0);
assert.calledWithExactly(device.setValue, device, deviceFeature, 1);
assert.callCount(device.setValue, 2);
assert.callCount(device.setValue, 3);
});

it('should blink light in medium mode', async () => {
Expand Down Expand Up @@ -91,10 +91,10 @@ describe('scene.blink-lights', () => {
],
scope,
);
clock.tick(2000);
clock.tick(2700);
assert.calledWithExactly(device.setValue, device, deviceFeature, 0);
assert.calledWithExactly(device.setValue, device, deviceFeature, 1);
assert.callCount(device.setValue, 4);
assert.callCount(device.setValue, 5);
});

it('should blink light in fast mode', async () => {
Expand Down Expand Up @@ -130,10 +130,10 @@ describe('scene.blink-lights', () => {
],
scope,
);
clock.tick(2000);
clock.tick(2200);
assert.calledWithExactly(device.setValue, device, deviceFeature, 0);
assert.calledWithExactly(device.setValue, device, deviceFeature, 1);
assert.callCount(device.setValue, 10);
assert.callCount(device.setValue, 11);
});

it('should blink light in unknown mode', async () => {
Expand Down Expand Up @@ -169,10 +169,10 @@ describe('scene.blink-lights', () => {
],
scope,
);
clock.tick(2000);
clock.tick(2200);
assert.calledWithExactly(device.setValue, device, deviceFeature, 0);
assert.calledWithExactly(device.setValue, device, deviceFeature, 1);
assert.callCount(device.setValue, 10);
assert.callCount(device.setValue, 11);
});

it('should throw error when blinking light', async () => {
Expand Down

0 comments on commit 3130826

Please sign in to comment.