mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-09-26 09:28:06 +00:00
Refactor!
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
/* global describe, it */
|
||||
|
||||
const chai = require('chai');
|
||||
const proxyquire = require('proxyquire').noPreserveCache();
|
||||
const data = () => proxyquire('../lib/util/data.js', {});
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* global describe, it */
|
||||
|
||||
const chai = require('chai');
|
||||
const sinon = require('sinon');
|
||||
const DevicePublish = require('../lib/extension/devicePublish');
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
const devices = require('zigbee-shepherd-converters').devices;
|
||||
const HomeassistantExtension = require('../lib/extension/homeassistant');
|
||||
const chai = require('chai');
|
||||
const homeassistant = new HomeassistantExtension(null, null, null, null);
|
||||
|
||||
describe('HomeAssistant extension', () => {
|
||||
it('Should have mapping for all devices supported by zigbee-shepherd-converters', () => {
|
||||
const missing = [];
|
||||
|
||||
devices.forEach((d) => {
|
||||
if (!homeassistant._getMapping()[d.model]) {
|
||||
missing.push(d.model);
|
||||
}
|
||||
});
|
||||
|
||||
chai.assert.strictEqual(missing.length, 0, `Missing HomeAssistant mapping for: ${missing.join(', ')}`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user