Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defineAdditionalTests() {
// Create mocks and asserts
const {
adapter,
database
} = utils.unit.createMocks();
const controller = new MiioControllerClass({});
let deviceId = 1;
/**
*
* @param {string} vendor
* @param {string} type
* @param {string} version
*/
function runOneDeviceTest(vendor, type, version, states) {
const model = `${vendor}.${type}.${version}`;
it(model, () => {
const id = deviceId++;
controller.registerDevice({
id: `miio:${id}`,
management: {