# Test Suite
Test organization for deBridge MCP Server.
## Structure
Each tool has its own test file for independent testing:
```
__tests__/
├── quoteSwap.test.ts # Cross-chain swap quotes (preview + full mode)
├── getSupportedChains.test.ts # Supported blockchain networks
├── getTokensInfo.test.ts # Token information by chain
├── getOrderStatus.test.ts # Order status tracking
└── README.md # This file
```
## Running Tests
```bash
# Run all tests
bun test
# Run specific test file
bun test src/__tests__/quoteSwap.test.ts
# Run tests matching pattern
bun test -t "preview mode"
# Run with coverage
bun test --coverage
```
## Test Categories
### quoteSwap Tests
- **Preview Mode**: Tests without wallet addresses (estimation only)
- **Full Mode**: Tests with wallet addresses (complete order creation)
- **Error Handling**: Invalid parameters, same chain validation
### getSupportedChains Tests
- Basic functionality: Returns list of chains
- Data validation: Includes major blockchains
### getTokensInfo Tests
- Token listing by chain ID
- Multiple chain support (Ethereum, BSC, etc.)
- Error handling for invalid chains
### getOrderStatus Tests
- Order status lookup
- Order ID validation
- Error handling
## Test Timeouts
- Standard tests: 30s
- Full mode tests: 60s (includes actual API calls)
- Network tests require `required_permissions: ["network"]`
## Best Practices
1. **Independence**: Each test should be independent and not rely on others
2. **Cleanup**: No cleanup needed (read-only operations)
3. **Mocking**: No mocking - tests use real deBridge API
4. **Documentation**: Clear test descriptions and console output
5. **Error Testing**: Always test both success and failure cases
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RookieCol/debridge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server