mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-24 06:28:30 +01:00
* Added current temperature, humidity and firmware * fixed wrong parameter * linting * fixed test cases * fixed serverless test cases * fixed test cases * variable renamed * version bump
54 lines
1.1 KiB
JavaScript
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,
|
|
};
|