Files
apartment-dashboard-api/__tests__/scraper
Stephen Minakian c25f2b4950
All checks were successful
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 12s
CI/CD Pipeline - Apartment API / Run Linting (pull_request) Successful in 9m36s
CI/CD Pipeline - Apartment API / Run Tests (pull_request) Successful in 9m51s
CI/CD Pipeline - Apartment API / Send Webhook Notification (pull_request) Successful in 2s
CI/CD Pipeline - Apartment API / Build & Push Image (pull_request) Has been skipped
CI/CD Pipeline - Apartment API / Deploy to Production (pull_request) Has been skipped
Implement updateDailySummary() aggregation function
Add daily summary aggregation that tracks apartment inventory changes:
- Upsert summaries by date key for idempotent operation
- Track new_units, rented_units, and stale_units arrays with counts
- Calculate net_change (new - rented) and total_available_today
- Fetch previous day summary for total_available_yesterday
- Compute turnover_rate as percentage of rented vs yesterday available
- Handle edge cases: zero division, missing previous day, month boundaries
- Full test coverage with 22 tests across all functional areas
2026-02-06 00:04:11 -07:00
..