Skip to content

Add test suite, find bugs, fix bug, add feature PATCH /tasks/:id/assign - #87

Open
kartikrautan wants to merge 1 commit into
rohit-ups:mainfrom
kartikrautan:my-work-for-the-assignment
Open

Add test suite, find bugs, fix bug, add feature PATCH /tasks/:id/assign#87
kartikrautan wants to merge 1 commit into
rohit-ups:mainfrom
kartikrautan:my-work-for-the-assignment

Conversation

@kartikrautan

@kartikrautan kartikrautan commented Aug 16, 2026

Copy link
Copy Markdown

Summary

  • 83 tests written with 96.12% code coverage (target was 80%+)
  • Inline Comments Added for Bug Issues in src/services/taskService.js
  • Fixed BUG 2: Pagination offset calculation ((page - 1) * limit)
  • Implemented PATCH /tasks/:id/assign endpoint with full validation
  • Added unit and integration tests for all features

Test results

Screenshot 2026-08-16 232810

Coverage

Screenshot 2026-08-16 232907

What you'd test next if you had more time:

Add concurrency/race condition tests (multiple requests updating same task), performance/load testing with large datasets, and error handling for malformed JSON payloads.

Anything that surprised you in the codebase:

No database layer (all in-memory storage resets on restart) and no authentication/authorization checks means the API trusts all clients completely — would be a security concern in production.

Any questions you'd ask before shipping this to production:

Should completed tasks be modifiable? Should we add soft-delete instead of hard-delete? Do we need to persist data to a real database? Should there be role-based access control for assigning tasks?

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