Files
ewelink-api/test/_setup/expectations.js
NickDub 5b4361a23d Added current temperature, humidity and firmware (#10)
* Added current temperature, humidity and firmware

* fixed wrong parameter

* linting

* fixed test cases

* fixed serverless test cases

* fixed test cases

* variable renamed

* version bump
2019-09-13 23:15:29 -03:00

54 lines
1.1 KiB
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),
model: expect.any(String),
},
},
};
const specificDeviceExpectations = {
name: expect.any(String),
deviceid: expect.any(String),
apikey: expect.any(String),
online: expect.any(Boolean),
extra: {
extra: {
uiid: expect.any(Number),
model: expect.any(String),
},
},
};
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,
};