Skip to content

Conversation

@psyberpath
Copy link

@psyberpath psyberpath commented Nov 3, 2025

fix(sample/10): fix id generation and controller return values

  • fix bug in CatsService (id generation)
  • fix multiple bugs in CatsController (no return, @res() usage)

feat(sample/10): add full test coverage

  • add complete unit test suite for CatsService
  • add complete e2e test suite for CatsController
  • add Jest config and dependencies to the sample

Fixes #1539

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

coveralls commented Nov 3, 2025

Pull Request Test Coverage Report for Build 0dfa1dfb-2666-4601-b521-80558e1a8704

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.684%

Totals Coverage Status
Change from base Build afbac173-069d-498a-91a4-8be82fe7ca5c: 0.0%
Covered Lines: 7416
Relevant Lines: 8269

💛 - Coveralls

fix(sample/10): fix id generation and controller return values
- fix bug in CatsService (id generation)
- fix multiple bugs in CatsController (no return, @res() usage)

feat(sample/10): add full test coverage
- add complete unit test suite for CatsService
- add complete e2e test suite for CatsController
- add Jest config and dependencies to the sample

Fixes nestjs#1539
@psyberpath psyberpath force-pushed the feat/sample-10-tests branch from dc3f333 to cb9dfd8 Compare November 3, 2025 17:23
@psyberpath psyberpath changed the title sample(sample/10): add unit and e2e tests for 10-fastify feat(sample/10): add unit and e2e tests for 10-fastify Nov 6, 2025
@psyberpath psyberpath changed the title feat(sample/10): add unit and e2e tests for 10-fastify sample(sample/10): add unit and e2e tests for 10-fastify Nov 6, 2025
@psyberpath
Copy link
Author

hi. it's being a couple of days and i'd like to know if there's an issue with my request. please let me know so i can fix it and align with the ideal.
thanks for Nest and happy to contribute.

@kamilmysliwiec
Copy link
Member

Could you please resolve merge conflicts?

Co-authored-by: Micael Levi L. Cavalcante <[email protected]>
@kamilmysliwiec
Copy link
Member

image

@psyberpath
Copy link
Author

I'm working on it. will push once done. thanks for the review.

…rrors and reinstalled @types/jest dev dependency
@psyberpath
Copy link
Author

I have fixed the configuration issue. tsconfig.json wasn't explicitly loading the jest types, so the compiler didn't see them even though the tests ran fine. I have updated tsconfig.json and also installed @types/jest, so the errors are now gone.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc request] Add unit/e2e tests to repo's samples

5 participants