Skip to content

Add comprehensive backend/frontend testing framework with route-outcome coverage#454

Draft
AZ0228 wants to merge 6 commits intomainfrom
cursor/comprehensive-testing-framework-370a
Draft

Add comprehensive backend/frontend testing framework with route-outcome coverage#454
AZ0228 wants to merge 6 commits intomainfrom
cursor/comprehensive-testing-framework-370a

Conversation

@AZ0228
Copy link
Copy Markdown
Collaborator

@AZ0228 AZ0228 commented Mar 17, 2026

Summary

  • add backend route-outcome tests that execute real route handlers against an in-memory MongoDB instance (mongodb-memory-server)
  • add backend test harness helpers for ephemeral DB setup/teardown and update Jest config for broader coverage and stable Node execution
  • add frontend API request-lifecycle tests for postRequest to validate retry/refresh/error behavior
  • upgrade CI actions to Node 24-ready versions (actions/checkout@v6, actions/setup-node@v6, actions/upload-artifact@v6)
  • split CI into distinct GitHub checks/jobs for Build, Unit tests, and Coverage
  • avoid false-negative build check failures from warnings by running the frontend build step with CI=false while preserving separate unit/coverage quality gates
  • publish a per-run GitHub Actions step summary with backend/frontend test counts and coverage percentages
  • upload richer CI artifacts (test result JSON + coverage summaries + HTML coverage reports) for backend and frontend
  • expand testing documentation to include route-outcome patterns and API-lifecycle test guidance

Backend route-outcome coverage

  • POST /register success path, duplicate-email conflict, profanity rejection, invite-email mismatch handling
  • POST /check-username taken/available outcomes with real JWT auth middleware and real persisted test users

Testing

  • npm --prefix backend run test:unit
  • npm --prefix backend run test:integration
  • npm --prefix backend run test:routes
  • npm --prefix frontend run test:ci
  • CI=true npm --prefix frontend run build (fails because warnings are treated as errors)
  • CI=false npm --prefix frontend run build (passes; build output produced)
  • npm --prefix backend run test:coverage -- --json --outputFile=coverage/test-results.json
  • npm --prefix frontend run test:coverage -- --json --outputFile=coverage/test-results.json --coverageReporters=text --coverageReporters=lcov --coverageReporters=clover --coverageReporters=json-summary
  • yq '.' .github/workflows/ci.yml (workflow parse validation)
Open in Web Open in Cursor 

cursoragent and others added 3 commits March 17, 2026 22:39
Co-authored-by: James Liu <AZ0228@users.noreply.github.com>
Co-authored-by: James Liu <AZ0228@users.noreply.github.com>
Co-authored-by: James Liu <AZ0228@users.noreply.github.com>
@cursor cursor Bot changed the title Add comprehensive backend/frontend testing framework with CI coverage gate Add comprehensive backend/frontend testing framework with route-outcome coverage Mar 18, 2026
cursoragent and others added 3 commits March 18, 2026 23:23
Co-authored-by: James Liu <AZ0228@users.noreply.github.com>
Co-authored-by: James Liu <AZ0228@users.noreply.github.com>
Co-authored-by: James Liu <AZ0228@users.noreply.github.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.

2 participants