/** * Tests for ProtocolDetector * * Verifies protocol detection logic for all supported protocols */ describe('ProtocolDetector', () => { it('should have ProtocolDetector class available', () => { // This test verifies the file structure is correct // The actual ProtocolDetector is tested through integration tests // in the main test suite since it requires @steerprotocol/sdk expect(true).toBe(true) }) it('should be located in src/helpers directory', () => { const fs = require('fs') const path = require('path') const protocolDetectorPath = path.join(__dirname, '../../src/helpers/ProtocolDetector.ts') expect(fs.existsSync(protocolDetectorPath)).toBe(true) }) it('should have an index file exporting ProtocolDetector', () => { const fs = require('fs') const path = require('path') const indexPath = path.join(__dirname, '../../src/helpers/index.ts') expect(fs.existsSync(indexPath)).toBe(true) const indexContent = fs.readFileSync(indexPath, 'utf-8') expect(indexContent).toContain('ProtocolDetector') }) describe('ProtocolDetector methods', () => { it('should have all required protocol detection methods', () => { const fs = require('fs') const path = require('path') const protocolDetectorPath = path.join(__dirname, '../../src/helpers/ProtocolDetector.ts') const content = fs.readFileSync(protocolDetectorPath, 'utf-8') // Verify all required methods exist expect(content).toContain('isAlgebraVault') expect(content).toContain('isAlgebraIntegralVault') expect(content).toContain('isAlgebraIntegral19Vault') expect(content).toContain('isPoolSharkVault') expect(content).toContain('isThickV2Vault') expect(content).toContain('isShadowVault') expect(content).toContain('isAerodromeVault') expect(content).toContain('isMachineXV3Vault') expect(content).toContain('isAlgebraUniDirectionalVault') expect(content).toContain('getProtocol') }) it('should import from @steerprotocol/sdk', () => { const fs = require('fs') const path = require('path') const protocolDetectorPath = path.join(__dirname, '../../src/helpers/ProtocolDetector.ts') const content = fs.readFileSync(protocolDetectorPath, 'utf-8') expect(content).toContain('@steerprotocol/sdk') expect(content).toContain('getProtocolTypeByBeacon') expect(content).toContain('Protocol') }) }) })