test: unit tests are placeholders and CI runs on Node 18

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

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
cypress, express, javascript, mongodb, node.js
Domain
backend, ci-cd, testing

Research direction

Start by reading __tests__/server.test.js and the “Server API tests” workflow to see the existing test setup and Node version. The issue proposes exercising the exported app with Supertest and mongodb-memory-server across auth, enrolment, payments and reviews, then updating CI to Node 22. Done means replacing placeholder checks with the listed integration cases and updating the workflow; branch protection is also requested.

Written by the indexing model from the issue text.

Description

enhancement

__tests__/server.test.js checks things like 2 + 2 === 4 and string operations, so the "Server API tests" workflow passes without exercising any controller or route. Only trie.test.js tests real code. The workflow also runs on Node 18.x, which is end-of-life.

Suggested fix

  • Add integration tests with Supertest against the exported app and an in-memory MongoDB (mongodb-memory-server) for auth, enrolment, payments and reviews: the happy path plus 401/403, not-owner, invalid input, missing ids and duplicates.
  • Run the workflow on Node 22 LTS and make it a required check for main.

Found while reviewing StudyNotion with Claude Code.

Dominant language
JavaScript
Stars
23
Forks
8
Avg merge
11m
Merged PRs (30d)
4

Getting set up

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.

More from khemssharma/StudyNotion

All issues in khemssharma/StudyNotion

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.