Skip to content

Add tests for // TODO test comments; remove resolved TODOs#126

Merged
sezanzeb merged 2 commits intoteams2from
copilot/add-simple-tests-for-todo-comments
Apr 12, 2026
Merged

Add tests for // TODO test comments; remove resolved TODOs#126
sezanzeb merged 2 commits intoteams2from
copilot/add-simple-tests-for-todo-comments

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 12, 2026

Several // TODO test comments existed in rating-service.ts, team-service.ts, and application-controller.ts with no corresponding coverage. This adds the missing tests and removes the now-resolved TODO comments.

New tests

rating-service.spec.tsgetUsersRatingsForProject

  • Returns only ratings matching the given project + user
  • Returns empty when no ratings exist, or when ratings belong to another user or project

team-service.spec.ts — expanded coverage

  • createTeam: owner is set to the creator; user's team field is assigned
  • acceptUserToTeam: only owner or root admin may accept; others throw
  • removeUserFromTeam: users can remove themselves; removing the owner throws; success nullifies team
  • setOwner: non-owner/non-admin throws; target not in team throws; success updates owner

application-controller.spec.ts — new file

  • getAllTeams: email addresses are absent from the serialized response (simulates ResponseInterceptor with classToPlain + excludeAll; UserResponseDto only exposes id, firstName, lastName)

Cleanup

All 11 // TODO test comments across the three source files have been removed.

Copilot AI and others added 2 commits April 12, 2026 21:19
Agent-Logs-Url: https://github.com/hackaburg/tilt/sessions/7c7127d4-6d01-41ef-a09c-77b78c39886d

Co-authored-by: sezanzeb <28510156+sezanzeb@users.noreply.github.com>
Copilot AI requested a review from sezanzeb April 12, 2026 21:40
@sezanzeb sezanzeb marked this pull request as ready for review April 12, 2026 21:42
@sezanzeb sezanzeb merged commit 7d276da into teams2 Apr 12, 2026
1 check passed
@sezanzeb sezanzeb deleted the copilot/add-simple-tests-for-todo-comments branch April 12, 2026 21:43
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.

2 participants