Run unit tests for velocity limits:
npx vitest run __tests__/unit/lib/pricing-package.test.ts
Expected output:
- ✅ should return raw price when velocity is disabled
- ✅ should return raw price when no price history exists
- ✅ should cap price increase if exceeds daily limit (+20%)
- ✅ should cap price decrease if exceeds daily limit (-20%)
- ✅ should not cap if price change is within daily limit
- ✅ should include velocity metadata in result
- ✅ should handle package discount correctly
📋 Next: Phase 2.2 - Velocity Integration
Po úspěšném testu wizardu:
- Integrate calculatePackagePriceWithVelocity() do API endpoints
- Hook up package-price-history DB wrappers
- Test E2E: Create package → check price history table
- Verify velocity limit enforcement over 3 days