Skip to content

Add Unit Tests for lesson Controllers #48

Closed

Description

@Dario0731

🛠 Issue: Add Unit Tests for Controllers

📌 Description

Write Jest unit tests for lesson controller endpoint.

📆 Additional Notes

Mock services to isolate tests.

Activity

  1. prince-konwea commented on Sep 11, 2025

    @prince-konwea
    Contributor

    Hello @Dario0731 my name is Prince Konwea, I’m a backend developer with strong experience in TypeScript and NestJS, and I regularly write unit tests with Jest to ensure reliability of server-side applications.

    For this issue, my approach would be:

    Set up a testing module with @nestjs/testing for the LessonController.

    Mock the LessonService to keep tests isolated from business logic and the database.

    Write unit tests covering both success cases and error scenarios for each controller endpoint.

    Ensure the tests align with the project’s existing structure and conventions.

    Happy to take this on and deliver clean, well-structured tests.
    ETA: 2 HOURS from assignment

  2. Stealth-cloud-droid commented on Sep 12, 2025

    @Stealth-cloud-droid
    Contributor

    I would like to work on this issue.
    I will also use my knowledge to solve the issue

  3. added a commit that references this issue on Sep 12, 2025
    615eb53
  4. added a commit that references this issue on Sep 12, 2025
    0b02bee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

good first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions