mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-23 06:12:23 +00:00
feat: Use Vitest for testing (#25284)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
1 parent
5d059b7bcb
commit
06f44533af
51 files changed
+2606
-4771
No files matched your search
+2
-4
@@ -39,7 +39,6 @@ export default class Device {
|
||||
|
||||
exposes(): zhc.Expose[] {
|
||||
assert(this.definition, 'Cannot retreive exposes before definition is resolved');
|
||||
/* istanbul ignore if */
|
||||
if (typeof this.definition.exposes == 'function') {
|
||||
const options: KeyValue = this.options;
|
||||
return this.definition.exposes(this.zh, options);
|
||||
@@ -81,7 +80,6 @@ export default class Device {
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
/* istanbul ignore next */
|
||||
if (key !== 'default') {
|
||||
return undefined;
|
||||
}
|
||||
@@ -104,7 +102,7 @@ export default class Device {
|
||||
}
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
/* v8 ignore next */
|
||||
return epName === 'default' ? undefined : epName;
|
||||
}
|
||||
|
||||
@@ -123,7 +121,7 @@ export default class Device {
|
||||
isDevice(): this is Device {
|
||||
return true;
|
||||
}
|
||||
/* istanbul ignore next */
|
||||
|
||||
isGroup(): this is Group {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ export default class Group {
|
||||
const definitions: zhc.Definition[] = [];
|
||||
|
||||
for (const member of this.membersDevices()) {
|
||||
/* istanbul ignore else */
|
||||
if (member.definition) {
|
||||
definitions.push(member.definition);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user