SCRAPE-15: Add getNextScheduledRun() test coverage #20

Merged
stephen merged 1 commits from scraper/next-run into dev 2026-02-06 18:21:30 -07:00

1 Commits

Author SHA1 Message Date
f436d0ed44 Add comprehensive test coverage for getNextScheduledRun()
All checks were successful
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 12s
CI/CD Pipeline - Apartment API / Lint & Test (pull_request) Successful in 39s
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
Add 4 new test cases for the getNextScheduledRun() function:
- Verify scheduled time respects configured timezone
- Validate returned time is always in the future
- Handle invalid cron expression gracefully (return null)
- Confirm cron-parser library is used for next run calculation

This brings the total scraperJob test count to 60.
2026-02-06 18:19:22 -07:00