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

Abierto
#57 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cypress, express, javascript, mongodb, node.js

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
23
Forks
8
Merge medio
11 min
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de khemssharma/StudyNotion

Todos los issues de khemssharma/StudyNotion

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.