fix: Substantially reduce cases where errors block whole card (#1764)

This commit is contained in:
Dermot Duffy
2024-12-15 20:39:18 -08:00
committed by GitHub
parent b6fb821074
commit dab9ff3045
25 changed files with 329 additions and 407 deletions
@@ -0,0 +1,12 @@
import { expect, it, vi } from 'vitest';
import { dispatchLiveErrorEvent } from '../../../../src/components-lib/live/utils/dispatch-live-error';
// @vitest-environment jsdom
it('should dispatch live error event', () => {
const element = document.createElement('div');
const handler = vi.fn();
element.addEventListener('frigate-card:live:error', handler);
dispatchLiveErrorEvent(element);
expect(handler).toBeCalled();
});