feat: Implement basic general folder support (#2051)

- Related: #1748
This commit is contained in:
Dermot Duffy
2025-05-21 19:59:21 -07:00
committed by GitHub
parent 2eb0d9e35e
commit c6a4c8aea2
350 changed files with 12837 additions and 4509 deletions
+23
View File
@@ -0,0 +1,23 @@
import { describe, expect, it, vi } from 'vitest';
import { fireHASSEvent } from '../../src/ha/fire-hass-event';
// @vitest-environment jsdom
describe('fireHASSEvent', () => {
it('should fire an event with specified type and detail', () => {
const target = document.createElement('div');
const handler = vi.fn();
const type = 'll-custom';
const detail = { action: 'test' };
target.addEventListener(type, handler);
fireHASSEvent(target, type, detail);
expect(handler).toBeCalledWith(
expect.objectContaining({
detail,
}),
);
});
});