TypeFetched/tests/quick-test.ts
Casey Collier b85b9a63e2 Initial commit: TypedFetch - Zero-dependency, type-safe HTTP client
Features:
- Zero configuration, just works out of the box
- Runtime type inference and validation
- Built-in caching with W-TinyLFU algorithm
- Automatic retries with exponential backoff
- Circuit breaker for resilience
- Request deduplication
- Offline support with queue
- OpenAPI schema discovery
- Full TypeScript support with type descriptors
- Modular architecture
- Configurable for advanced use cases

Built with bun, ready for npm publishing
2025-07-20 12:35:43 -04:00

27 lines
No EOL
777 B
TypeScript

#!/usr/bin/env bun
import { tf } from '../src/index.js'
console.log('🚀 Quick Revolutionary Test')
console.log('===========================')
async function quickTest() {
try {
console.log('Testing basic GET request...')
const result = await tf.get('https://httpbin.org/json')
console.log('✅ Basic GET works:', result.data ? 'Got data' : 'No data')
console.log('Testing type inference...')
const types = tf.getAllTypes()
console.log('✅ Type registry:', Object.keys(types).length, 'endpoints')
console.log('Testing metrics...')
const metrics = tf.getMetrics()
console.log('✅ Metrics:', metrics.totalRequests, 'requests tracked')
} catch (error) {
console.error('❌ Error:', error.message)
}
}
quickTest()