-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Test_runner: --experimental-test-coverage
detects uncovered lines incorrectly.
#53719
Comments
Thanks for the report! Could you provide a minimally reproducible example? One without any external dependencies / repos? |
I will try |
Are you enabling source maps? |
No, but how it should affects a test coverage? Tests running on already compiled and not minified code. But affects in fact. I have tried to enable sourceMap in a tsconfig. In this case tests were passed successfully but coverage calculation failed with a message: Warning: Could not report code coverage. TypeError: Cannot read properties of undefined (reading 'line') |
Hm, I tried running the tests and added some print statements. The |
I read the tests very carefully. Yeah, it turns out that this check looks appropriate in the context of a single function. But from the outside this function is called in such a way that this condition will never be fulfilled. A kind of overkill. I apologize for the time spent. It seems that everything fine with the coverage calculation. |
Version
20.15.0
Platform
Subsystem
No response
What steps will reproduce the bug?
git@github.com:muturgan/fastest-express-validator.git
uncovered lines
colunm of adist/index.cjs
fileHow often does it reproduce? Is there a required condition?
It reproduces every time. No special conditions are needed.
What is the expected behavior? Why is that the expected behavior?
Report of a
dist/index.cjs
file is NOT contains 53-55 uncovered lines (which corresponds to adefaultRequestValidatorHandler
success branch). Because of I have acorrect user request
test case which not produces a validation error.What do you see instead?
The coverage report of a
dist/index.cjs
file mark 53-55 lines as uncovered.Additional information
No response
The text was updated successfully, but these errors were encountered: