test(surveys): add unit tests for skipSurvey() function#447
test(surveys): add unit tests for skipSurvey() function#447sannidhyaroy wants to merge 2 commits intoOneBusAway:developfrom
skipSurvey() function#447Conversation
There was a problem hiding this comment.
Pull request overview
Adds missing unit test coverage for skipSurvey() to prevent regressions in recurring vs one-time survey skip behavior (per #444 / PR #420 context).
Changes:
- Import
skipSurveyinto the existing surveys utils test suite. - Add 3 new
skipSurvey()unit tests covering recurring skip, one-time skip, and stale flag cleanup.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@aaronbrethorst While working on this, I noticed the mock I didn't want to change it initially as I feared it could break existing tests that rely on its current behavior. But, Copilot is right that the Let me know if there's anything to adjust here. |
Summary
Adds unit tests for
skipSurvey()covering the three cases outlined in #444:allows_multiple_responses: true, always_visible: true): verifies only_skipped_timestampis set_skippedis set_skippedis removed when a recurring survey is skipped againCloses #444
Test plan
npm run testpasses