oss-slu / oss-slu/DigitalBoneBox

Test `/api/description` endpoint

Open
#265 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

back-end enhancement good first issue tests
Dominant language
JavaScript
Stars
8
Forks
18
Avg merge
8h 17m
Merged PRs (30d)
4

Description

🎯 Goal / Objective

A clear and concise description of what this task aims to achieve. Why is this task important?

Write unit tests for the /api/description endpoint in server.js.


✅ Tasks to be Completed

A checklist of the specific, actionable steps required to complete this issue. This helps track progress.

  • Test that a successful data fetch returns status 200 and expected data type
  • Test that any inputs into the endpoint are properly validated
  • Test that bad inputs return status 400
  • Test that trying to fetch non-existent data returns status 404
  • The above steps are just a place to get started. Test for more edge cases and possible inputs/outputs than the steps listed here.
  • Fix any errors that failed tests expose.

Acceptance Criteria

A checklist of conditions that must be met for this task to be considered complete. How will we verify that it's done correctly?

  • The new feature is implemented as described.
  • All related code passes the repository's workflow checks (linting, tests).
  • The application runs without errors after the changes are made.

Additional Context

Add any other context, notes, screenshots, or links that might be helpful for completing this task.

#263 is a prerequisite. See the parent issue for more information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading server.js and the prerequisite issue #263 to understand the /api/description endpoint and its expected inputs and outputs. Check the repository's existing test conventions before covering successful, invalid, missing-data, and edge-case responses. Done means the endpoint has unit-test coverage, failures are addressed, and the repository workflow checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.