Files
ewelink-api/test/_setup/expectations.js
Martin M 024aaa8a2c Release v1.4.1 (#13)
* specific error when requested channel is bigger than total

* fix for multi-channel devices

* updated test expectations

* fixes with uiid api changes

* fix wrong error message

* added new test cases

* return expected error on wrong channel number

* added more devices

* version bump
2019-09-11 23:46:17 -03:00

52 lines
1021 B
JavaScript

const loginExpectations = {
at: expect.any(String),
user: { email: expect.any(String) },
region: expect.any(String),
};
const allDevicesExpectations = {
name: expect.any(String),
deviceid: expect.any(String),
apikey: expect.any(String),
params: expect.any(Object),
showBrand: expect.any(Boolean),
extra: {
extra: {
uiid: expect.any(Number),
},
},
};
const specificDeviceExpectations = {
name: expect.any(String),
deviceid: expect.any(String),
apikey: expect.any(String),
online: expect.any(Boolean),
extra: {
extra: {
uiid: expect.any(Number),
},
},
};
const rawPowerUsageExpectations = {
status: 'ok',
data: {
hundredDaysKwhData: expect.any(String),
},
};
const currentMonthPowerUsageExpectations = {
status: 'ok',
monthly: expect.any(Number),
daily: expect.any(Array),
};
module.exports = {
loginExpectations,
allDevicesExpectations,
specificDeviceExpectations,
rawPowerUsageExpectations,
currentMonthPowerUsageExpectations,
};