mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-21 21:33:11 +01:00
* added multi-channel device * added get and set power state * added some fixes * add “this” to call class methods * create params object before build payload * typo fixed on “switches” param * added new test cases * improved error message * added more test cases * added authentication error * added fix channel number too high * added region change if wrong * linting + small fixes * linting + renamed method * linting
29 lines
635 B
JavaScript
29 lines
635 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),
|
|
uiid: expect.any(Number),
|
|
};
|
|
|
|
const specificDeviceExpectations = {
|
|
name: expect.any(String),
|
|
deviceid: expect.any(String),
|
|
apikey: expect.any(String),
|
|
online: expect.any(Boolean),
|
|
uiid: expect.any(Number),
|
|
};
|
|
|
|
module.exports = {
|
|
loginExpectations,
|
|
allDevicesExpectations,
|
|
specificDeviceExpectations,
|
|
};
|