import { buildLpPositionsReport } from './lp-positions-report';

describe('buildLpPositionsReport', () => {
  it('rejects invalid addresses', async () => {
    await expect(buildLpPositionsReport({ chainId: 138, address: 'not-an-address' })).rejects.toThrow(
      'Invalid address',
    );
  });

  it('returns policy note and skips RPC scan for unsupported chains', async () => {
    const report = await buildLpPositionsReport({
      chainId: 99999,
      address: '0x4A666F96fC8764181194447A7dFdb7d471b301C8',
    });
    expect(report.positions).toEqual([]);
    expect(report.rpcUsed).toBe(false);
    expect(report.notes.some((note) => note.includes('not bridgeable'))).toBe(true);
    expect(report.notes.some((note) => note.includes('No RPC URL'))).toBe(true);
  });
});
