Files
ewelink-api/test/_setup/expectations.js
Martin M 98b8d8a97c Release v1.8.1 (#28)
* new method to get user region

* added new test

* version bump
2019-11-11 00:22:08 -03:00

67 lines
1.3 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),
};
const firmwareExpectations = {
status: expect.any(String),
deviceId: expect.any(String),
msg: expect.any(String),
};
const regionExpectations = {
email: expect.any(String),
region: expect.any(String),
};
module.exports = {
loginExpectations,
allDevicesExpectations,
specificDeviceExpectations,
rawPowerUsageExpectations,
currentMonthPowerUsageExpectations,
firmwareExpectations,
regionExpectations,
};