mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 14:01:20 +00:00
fix: Improve looping performance (#23541)
* Use herdsman improved looping. * Fix lint. * Fix tests. * Feedback
This commit is contained in:
1 parent
fe6cacd87e
commit
13ac8a0f53
21 files changed
+387
-164
No files matched your search
@@ -4,6 +4,11 @@ const versionHerdsman = require('../node_modules/zigbee-herdsman/package.json').
|
||||
const versionHerdsmanConverters = require('../node_modules/zigbee-herdsman-converters/package.json').version;
|
||||
|
||||
describe('Utils', () => {
|
||||
it('Object is empty', () => {
|
||||
expect(utils.objectIsEmpty({})).toBeTruthy();
|
||||
expect(utils.objectIsEmpty({a: 1})).toBeFalsy();
|
||||
});
|
||||
|
||||
it('Object has properties', () => {
|
||||
expect(utils.objectHasProperties({a: 1, b: 2, c: 3}, ['a', 'b'])).toBeTruthy();
|
||||
expect(utils.objectHasProperties({a: 1, b: 2, c: 3}, ['a', 'b', 'd'])).toBeFalsy();
|
||||
|
||||
Reference in new issue
Block a user