-
Notifications
You must be signed in to change notification settings - Fork 1
Unit Test Reports
This document summarizes the generated unit test reports for the three implementation layers of the Neighborhood Emergency Preparedness Hub project:
- Back-end
- Front-end
- Mobile
Report date: 2026-04-11
| Item | Value |
|---|---|
| Runtime | Node.js |
| Framework | Express.js |
| Test runner | Jest |
| Test command | npm run test:unit |
| Test location | backend/tests/unit |
cd backend
npm run test:unitTest Suites: 12 passed, 12 total
Tests: 211 passed, 211 total
Snapshots: 0 total
Time: 1.528 s
| Metric | Result |
|---|---|
| Status | Passed |
| Test suites | 12 passed / 12 total |
| Unit tests | 211 passed / 211 total |
| Snapshots | 0 |
| Failed tests | 0 |
The back-end unit tests cover the main MVP modules:
| Module | Tested Layers |
|---|---|
| Auth | Controller, service, validators |
| Profiles | Controller, service, validators |
| Help requests | Controller, service, validators |
| Availability | Controller, service, validators |
backend/tests/unit/modules/auth/controller.test.js
backend/tests/unit/modules/auth/service.test.js
backend/tests/unit/modules/auth/validators.test.js
backend/tests/unit/modules/profiles/controller.test.js
backend/tests/unit/modules/profiles/service.test.js
backend/tests/unit/modules/profiles/validators.test.js
backend/tests/unit/modules/help-requests/controller.test.js
backend/tests/unit/modules/help-requests/service.test.js
backend/tests/unit/modules/help-requests/validators.test.js
backend/tests/unit/modules/availability/controller.test.js
backend/tests/unit/modules/availability/service.test.js
backend/tests/unit/modules/availability/validators.test.js
The back-end unit tests verify:
- Request validation rules for all implemented modules
- Successful and failing authentication flows
- Email verification and password reset logic
- JWT-based authentication and authorization behavior
- Profile creation and update behavior
- Health, physical, location, privacy, profession, and expertise validation
- Help request creation, guest access behavior, request visibility, and status transitions
- Volunteer availability toggling, synchronization, assignment retrieval, cancellation, and resolution logic
- Controller-level error handling and expected HTTP status codes
- Service-level business logic independent from Express routing
The back-end currently has an active and passing Jest unit test suite. The implemented module structure follows a testable layered architecture:
routes -> controller -> service -> repository -> validators
Unit tests are focused mainly on controller, service, and validator behavior. Repository/database behavior is covered separately by integration tests.
| Item | Value |
|---|---|
| Framework | Next.js |
| UI library | React |
| Language | TypeScript |
| Styling | CSS tokens and component-level styles |
| Project path | web |
The front-end project currently does not define a unit test script in web/package.json.
Current scripts:
{
"dev": "next dev",
"build": "next build",
"start": "next start"
}No project-owned front-end unit test files were found under web/src.
The only discovered test-like files are inside web/node_modules, which belong to third-party dependencies and are not part of this project's test suite.
| Metric | Result |
|---|---|
| Status | Not configured |
| Test runner | Not currently installed/configured |
| Project-owned test files | 0 |
| Executed unit tests | 0 |
| Failed tests | Not applicable |
Although automated front-end unit tests are not yet configured, the front-end implementation is structured in a way that can support future unit testing:
- Reusable UI components are located under
web/src/components/ui - Feature-level components are located under
web/src/components/feature - Shared logic is separated under
web/src/lib - Reusable design tokens are located under
web/src/styles/tokens - Pages are implemented using the Next.js App Router under
web/src/app
Recommended tools:
- Vitest or Jest for unit testing
- React Testing Library for component behavior tests
-
@testing-library/jest-domfor DOM assertions
Recommended initial test targets:
| Area | Suggested Tests |
|---|---|
| Auth forms | Required fields, invalid email, password validation, submit behavior |
| Profile view/edit forms | Field rendering, validation messages, save action behavior |
| Shared inputs | Text input, password input, select input, textarea, verification code input |
| Shared buttons | Disabled, loading, click states |
| Utility functions | API client behavior, email validator, formatting helpers |
The front-end does not currently have generated automated unit test results. For milestone reporting, this should be recorded as a current limitation and a planned improvement. The component structure is suitable for adding unit tests in the next iteration.
| Item | Value |
|---|---|
| Platform | Android |
| Language | Kotlin |
| UI framework | Jetpack Compose |
| Navigation | Navigation Compose |
| Project path | android |
Test configuration for mobile has not been implemented in the scope of MVP. JUnit for pure Kotlin unit tests, and Compose UI testing for screen-level UI behavior are planned to be implemented.
The mobile implementation is organized around feature screens and reusable Compose components:
| Area | Examples |
|---|---|
| Auth screens | Login, signup, verify email, forgot password, reset password, complete profile |
| Main feature screens | Home, request help, assigned request, notifications, news, gathering areas |
| Profile screens | Profile, edit profile, profile data models |
| Shared UI components | Buttons, inputs, display cards, selection controls |
| Navigation | App navigation graph and route definitions |
| Layer | Status | Summary |
|---|---|---|
| Back-end | Passing | 211 unit tests passed across 12 Jest suites |
| Front-end | Not configured | No project-owned unit test runner or test files yet |
| Mobile | Not implemented yet | No unit tests yet |
The back-end currently has a complete generated unit test report with all tests passing. The front-end and mobile layers do not yet have generated automated unit test results.
For the next milestone, what is planned is to add lightweight unit test setups for both front-end and mobile, focusing first on validation utilities, reusable components, and critical user flows.
🎓 Team Members
- Weekly Meeting 1 (16.02.2026)
- Weekly Meeting 2 (25.02.2026)
- Weekly Meeting 3 (04.03.2026)
- Weekly Meeting 4 (11.03.2026)
- Weekly Meeting 5 (18.03.2026)
- Weekly Meeting 6 (25.03.2026)
- Weekly Meeting 7 (01.04.2026)
- Weekly Meeting 8 (08.04.2026)
- Weekly Meeting 9 (15.04.2026)
- Weekly Meeting 10 (29.04.2026)
- Weekly Meeting 11 (06.05.2026)
- Weekly Meeting 12 (13.05.2026)
- Lab 1 Report (12/02/2026)
- Lab 2 Report (19/02/2026)
- Lab 3 Report (26/02/2026)
- Lab 4 Report (05/03/2026)
- Lab 5 Report (12/03/2026)
- Lab 6 Report (26/03/2026)
- Lab 7 Report (02/04/2026)
- Lab 8 Report (16/04/2026)
- Lab 9 Report (30/04/2026)
- Lab 10 Report (07/05/2026)
- Scenario 1: Injured Neighbor
- Scenario 2: Volunteer Users Help Offer
- Scenario 3: User Registration and Profile Setup
- Use Case Diagram (Final)
- Use Case Diagram for Scenerio 1 ‐ Sub‐group 2
- Use Case Diagram for Scenerio 2 ‐ Sub‐group 3
- Use Case Diagram for Scenerio 3 ‐ Sub‐group 1
- Sequence Diagram - Alper Kartkaya
- Sequence Diagram - Kağan Can
- Sequence Diagram - Mehmet Can Gürbüz
- Sequence Diagram - Ethem Erinç Cengiz
- Sequence Diagram - Berat Sayın
- Sequence Diagram - Gülce Tahtasız
- Sequence Diagram - Rojhat Delibaş