Skip to content

test: add 7 shift error-path tests#33

Open
EricGrill wants to merge 1 commit into
mainfrom
justobot/shift-error-tests
Open

test: add 7 shift error-path tests#33
EricGrill wants to merge 1 commit into
mainfrom
justobot/shift-error-tests

Conversation

@EricGrill
Copy link
Copy Markdown
Contributor

Summary

  • Adds 7 tests covering shift route error paths that had zero coverage
  • Tests: invalid farm (404), non-foreman (404), nonexistent shift on close/checkin/GET (404), close-with-no-workers (400), checkin-on-closed-shift (409)
  • All 7 new tests pass. Pre-existing 9 failures unchanged.

Test plan

  • node --test backend/test/api.test.js — 58 pass, 9 pre-existing fail

Serves goal #13 (100% unit test coverage by April 15)

🤖 Generated with Claude Code

Covers 404/409/400 responses for invalid farm, non-foreman worker,
nonexistent shift on close/checkin/GET, closed-shift checkin, and
close-with-no-workers. Moves test count from 53 to 60.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant