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

100% Test Coverage #3067

Open
Uzlopak opened this issue Apr 7, 2024 · 9 comments
Open

100% Test Coverage #3067

Uzlopak opened this issue Apr 7, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@Uzlopak
Copy link
Contributor

Uzlopak commented Apr 7, 2024

Obligatory issue.

Also: If we have 100% test coverage, we could drop codecov.

@Uzlopak Uzlopak added the enhancement New feature or request label Apr 7, 2024
@mertcanaltin
Copy link
Member

Wouldn't it be good to keep the codecov for future testing?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Apr 7, 2024

We can use c8 and configure it so that it return non 0 return value when running in the CI/CD Pipeline. So if we have a PR without a proper test, we could nag about the missing test. Codecov is only necessary if we have below 100% coverage.

@mertcanaltin
Copy link
Member

We can use c8 and configure it so that it return non 0 return value when running in the CI/CD Pipeline. So if we have a PR without a proper test, we could nag about the missing test. Codecov is only necessary if we have below 100% coverage.

I got it, thank you very much

@KhafraDev
Copy link
Member

I don't see the benefit in having 100% code coverage.

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Apr 7, 2024

I am not saying, that you personally should start implementing tests.

E.g. I am still writing tests for cookies and I constantly find bugs. And I can not fix them, because upstreaming in deno is basically impossible, because I see that they cant even invest time to review the PR to fix the maxAge bug. I will open for the cookies problem a separate issue. But yeah, it is annoying.

We need to investigate with the tests if the underlying code is actually working or not. So it is not only achieve 100% test coverage but also investigate if the logic is valid or not.

@KhafraDev
Copy link
Member

100% test coverage and validating logic are mutually exclusive issues, the latter one I have no problems with. I see it as not only a false sense of security, but also a waste of time.

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Apr 8, 2024

I disagree. Code which is not covered by any test has imho the inherent assumption to be erroneous or being obsolete.

@KhafraDev
Copy link
Member

I consider tests that exist for the sake of code coverage erroneous and obsolete 😉

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Apr 8, 2024

We agree to disagree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants