Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why test coverage decrease by using @TypedRoute decorator? #1158

Open
hyeonjae-lee09 opened this issue Dec 16, 2024 · 1 comment
Open

Why test coverage decrease by using @TypedRoute decorator? #1158

hyeonjae-lee09 opened this issue Dec 16, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@hyeonjae-lee09
Copy link

hyeonjae-lee09 commented Dec 16, 2024

Question

I have installed nestia library to use nestia/swagger.
but as using nestia decorator such like @TypedRoute.Get() , @TypedQuery(), test code coverage went down.
How can I solve this problem? Does I need to generate and use mock function of decorator?
If you have solution, can you please teach me? thanks 삼촌

@samchon
Copy link
Owner

samchon commented Dec 16, 2024

@TypedRoute() methods validate the return value.

Therefore, if your test coverage became decreased, it's because you had returned the wrong typed value.

If you wanna force returning the value, but just log which type error exists, utilize validate.log option.

https://nestia.io/docs/core/TypedRoute/#configuration

@samchon samchon self-assigned this Dec 16, 2024
@samchon samchon added the question Further information is requested label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants