Skip to content

Commit

Permalink
Add job in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Terdious authored Nov 3, 2022
1 parent 1af6e66 commit 61ff68b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/test/lib/device/device.getDeviceFeaturesStates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('Device.getDeviceFeaturesStates', function Describe() {
}),
};
const dateState = '2000-06-15';
const device = new Device(event, {}, stateManager, {}, {}, variable);
const device = new Device(event, {}, stateManager, {}, {}, variable, job);
const states = await device.getDeviceFeaturesStates('test-device-feature', {
from: new Date(`${dateState}T00:00:00.000Z`).toISOString(),
attributes: 'created_at,value',
Expand All @@ -65,7 +65,7 @@ describe('Device.getDeviceFeaturesStates', function Describe() {
get: fake.returns(null),
};
const dateState = '2000-06-15';
const device = new Device(event, {}, stateManager, {}, {}, variable);
const device = new Device(event, {}, stateManager, {}, {}, variable, job);
const promise = device.getDeviceFeaturesStates('test-device-feature', {
from: new Date(`${dateState}T00:00:00.000Z`).toISOString(),
to: new Date(`${dateState}T10:00:00.000Z`).toISOString(),
Expand All @@ -82,7 +82,7 @@ describe('Device.getDeviceFeaturesStates', function Describe() {
name: 'my-feature',
}),
};
const device = new Device(event, {}, stateManager, {}, {}, variable);
const device = new Device(event, {}, stateManager, {}, {}, variable, job);
const promise = device.getDeviceFeaturesStates('this-device-does-not-exist', {});
return assert.isRejected(promise, 'Start date missing');
});
Expand Down

0 comments on commit 61ff68b

Please sign in to comment.