import { expect, tap } from '@git.zone/tstest/tapbundle';
import { generatedHomeAssistantPortCount, handwrittenHomeAssistantPortDomains } from '../../ts/integrations/generated/index.js';
import { createDefaultIntegrationRegistry } from '../../ts/index.js';

tap.test('registers generated native Home Assistant port skeletons', async () => {
  expect(generatedHomeAssistantPortCount).toBeGreaterThan(1000);
  expect(handwrittenHomeAssistantPortDomains).toContain('hue');
  const registry = createDefaultIntegrationRegistry();
  expect(registry.get('3_day_blinds')).toBeTruthy();
  expect(registry.get('hue')?.status).toEqual('control-runtime');
});

export default tap.start();
