Skip to content

Add backend integration tests for auth, invites, friends, and messages #23

@chthonn

Description

@chthonn

Difficulty: Advanced

Context

PiperChat has several important backend flows but no test harness yet. A focused integration test setup would make future GSSoC contributions safer and help maintainers review PRs faster.

Expected work

  • Add a backend test runner suitable for an Express + Mongoose ESM project.
  • Add test setup for isolated database usage.
  • Cover auth signup/signin behavior at a high level.
  • Cover invite acceptance behavior.
  • Cover friend request accept/ignore behavior.
  • Cover basic channel or direct message send/load behavior.
  • Document how maintainers and contributors should run tests.

Acceptance criteria

  • npm test or an equivalent backend test command exists in server/package.json.
  • Tests run without requiring production credentials.
  • Tests do not depend on the maintainer's real MongoDB Atlas data.
  • At least four meaningful backend flows are covered.
  • README or backend docs mention the test command.

Suggested files

  • server/package.json
  • server/routes/auth.js
  • server/routes/invites.js
  • server/routes/friends.js
  • server/routes/chat.js
  • server/routes/directMessages.js
  • README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions