/** * Tests for package exports * Ensures all public API exports are available */ import { // Primary API CustomRouterFactory, NoopLogger, SwapCalculator, // Helper modules AbiManager, ContractFactory, QuoterFactory, PositionExtractor, BalanceQuerier, PoolStateQuerier, getProtocolConfigKeys, getFactoryAddress, getQuoterV2Address, PROTOCOL_CONFIG_MAP, DEFAULT_PROTOCOL_CONFIG, getNetworkConfig, getAvailableNetworks, hasNetwork, // Routers BaseRouter, UniswapCustomRouter, AlgebraCustomRouter, PoolSharkCustomRouter, AerodromeCustomRouter, } from '../src/index'; describe('Package Exports', () => { describe('Primary API', () => { it('should export CustomRouterFactory', () => { expect(CustomRouterFactory).toBeDefined(); expect(typeof CustomRouterFactory).toBe('function'); }); it('should export Logger utilities', () => { expect(NoopLogger).toBeDefined(); expect(typeof NoopLogger).toBe('object'); }); it('should export SwapCalculator', () => { expect(SwapCalculator).toBeDefined(); expect(typeof SwapCalculator).toBe('function'); }); }); describe('Helper Modules', () => { it('should export AbiManager', () => { expect(AbiManager).toBeDefined(); expect(typeof AbiManager).toBe('function'); }); it('should export ContractFactory', () => { expect(ContractFactory).toBeDefined(); expect(typeof ContractFactory).toBe('function'); }); it('should export QuoterFactory', () => { expect(QuoterFactory).toBeDefined(); expect(typeof QuoterFactory).toBe('function'); }); it('should export PositionExtractor', () => { expect(PositionExtractor).toBeDefined(); expect(typeof PositionExtractor).toBe('function'); }); it('should export BalanceQuerier', () => { expect(BalanceQuerier).toBeDefined(); expect(typeof BalanceQuerier).toBe('function'); }); it('should export PoolStateQuerier', () => { expect(PoolStateQuerier).toBeDefined(); expect(typeof PoolStateQuerier).toBe('function'); }); }); describe('Protocol Config Functions', () => { it('should export getProtocolConfigKeys', () => { expect(getProtocolConfigKeys).toBeDefined(); expect(typeof getProtocolConfigKeys).toBe('function'); }); it('should export getFactoryAddress', () => { expect(getFactoryAddress).toBeDefined(); expect(typeof getFactoryAddress).toBe('function'); }); it('should export getQuoterV2Address', () => { expect(getQuoterV2Address).toBeDefined(); expect(typeof getQuoterV2Address).toBe('function'); }); it('should export PROTOCOL_CONFIG_MAP', () => { expect(PROTOCOL_CONFIG_MAP).toBeDefined(); expect(typeof PROTOCOL_CONFIG_MAP).toBe('object'); }); it('should export DEFAULT_PROTOCOL_CONFIG', () => { expect(DEFAULT_PROTOCOL_CONFIG).toBeDefined(); expect(typeof DEFAULT_PROTOCOL_CONFIG).toBe('object'); }); }); describe('Network Config Functions', () => { it('should export getNetworkConfig', () => { expect(getNetworkConfig).toBeDefined(); expect(typeof getNetworkConfig).toBe('function'); }); it('should export getAvailableNetworks', () => { expect(getAvailableNetworks).toBeDefined(); expect(typeof getAvailableNetworks).toBe('function'); }); it('should export hasNetwork', () => { expect(hasNetwork).toBeDefined(); expect(typeof hasNetwork).toBe('function'); }); }); describe('Router Implementations', () => { it('should export BaseRouter', () => { expect(BaseRouter).toBeDefined(); expect(typeof BaseRouter).toBe('function'); }); it('should export UniswapCustomRouter', () => { expect(UniswapCustomRouter).toBeDefined(); expect(typeof UniswapCustomRouter).toBe('function'); }); it('should export AlgebraCustomRouter', () => { expect(AlgebraCustomRouter).toBeDefined(); expect(typeof AlgebraCustomRouter).toBe('function'); }); it('should export PoolSharkCustomRouter', () => { expect(PoolSharkCustomRouter).toBeDefined(); expect(typeof PoolSharkCustomRouter).toBe('function'); }); it('should export AerodromeCustomRouter', () => { expect(AerodromeCustomRouter).toBeDefined(); expect(typeof AerodromeCustomRouter).toBe('function'); }); }); });