Files
apartment-dashboard-api/__tests__/scraper
Stephen Minakian 6eaf79f662
All checks were successful
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 13s
CI/CD Pipeline - Apartment API / Run Linting (pull_request) Successful in 9m37s
CI/CD Pipeline - Apartment API / Run Tests (pull_request) Successful in 9m47s
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
SCRAPE-8: Implement markStaleUnits() to flag unavailable units
Add markStaleUnits() that marks units as unavailable when they are not
present in the current scrape results. Uses MongoDB updateMany with a
$nin filter on unit_code to efficiently update only units that were
previously available but no longer appear in the scraped data. Sets
available to false and records marked_stale_date.

Includes 18 tests covering filter criteria, $set fields, already
unavailable units, empty currentUnitCodes, error handling, logging,
and return value verification.
2026-02-05 23:37:41 -07:00
..