Skip to content

Improve unit tests coverage for api code #287

@ZibanPirate

Description

@ZibanPirate

Description

if you:

  • go to ./api folder
  • then run yarn test:cov:watch inside it
  • then open ./api/coverage/lcov-report/index.html file in your browser

you will see that some directories are marked as red, which means test coverage is below 80%. you can also see the same results in codecov.io

In this task we will make sure that all dirs are marked green ✅.

Check List

  1. add unit test for ./api/src/logger/service.ts, similar to config/service.spec.ts
  2. add unit test for ./api/src/app/middlewares/error.ts.
  3. add unit test for ./api/src/app/middlewares/logger.ts.
  4. add unit test for ./api/src/app/middlewares/security.ts.
  5. add unit test for ./api/src/app/middlewares/docs.ts.

after #286 is done, more tasks will be added here...

Additional Comments

Please create new PR for each task.

Also, it would be great for transparency if you comment below which task you want to take up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions