import {
  describe,
  expect,
  it
} from 'vitest';

import { endpointSupportsServerDiscovery } from './server-discovery.rules';

describe('server-discovery.rules', () => {
  it('skips discovery calls for production signal hosts without featured/trending routes', () => {
    expect(endpointSupportsServerDiscovery('https://signal.toju.app')).toBe(false);
    expect(endpointSupportsServerDiscovery('https://signal-sweden.toju.app')).toBe(false);
  });

  it('allows discovery on local and custom signal servers', () => {
    expect(endpointSupportsServerDiscovery('http://localhost:3001')).toBe(true);
    expect(endpointSupportsServerDiscovery('https://signal.example.com')).toBe(true);
  });
});
