chore: Switch coverage from istanbul to the v8 provider for speed (#2619)

This commit is contained in:
Dermot Duffy
2026-07-26 14:21:27 -07:00
committed by GitHub
parent 3b8835ee7c
commit ababe133a8
32 changed files with 128 additions and 275 deletions
+8
View File
@@ -104,6 +104,14 @@ export class Camera {
this._capabilities ??
(await this._buildCapabilities(hass, options));
// The else path is tested, but the `v8` coverage provider miscounts it: a
// missing `else` is given the count of the `if` statement minus the count
// of its body, and the engine only counts code after an `await` for the
// calls that actually paused there. Calls that took an earlier `??` value
// above skipped the `await`, which makes the first number the smaller one
// and the result negative.
// See: https://github.com/AriPerkkio/ast-v8-to-istanbul/issues/148
/* v8 ignore else -- @preserve */
if (this._capabilities.has('trigger')) {
await this._getTriggerEntities(hass, options);
this._config.triggers.entities = uniq(this._config.triggers.entities);