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

--test & --test-reporter & --test-reporter-destination will swallow error #52670

Closed
himself65 opened this issue Apr 24, 2024 · 7 comments
Closed
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. test_runner Issues and PRs related to the test runner subsystem.

Comments

@himself65
Copy link
Member

Version

18,x 20.x, 22

Platform

macos

Subsystem

test_runner

What steps will reproduce the bug?

throw new Error('')

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

No response

What do you see instead?

node --test  ./index.js
// Error throw

node --test --test-reporter=lcov --test-reporter-destination=lcov.info  ./index.js
// nothing happened

Additional information

No response

@himself65 himself65 added the test_runner Issues and PRs related to the test runner subsystem. label Apr 24, 2024
@cjihrig
Copy link
Contributor

cjihrig commented Apr 24, 2024

This seems like expected behavior that is only specific to the lcov reporter, and has nothing to do with the reporter destination. This is because the lcov reporter's only functionality is to report code coverage information. It might be worth updating the lcov reporter docs to specify that:

  • No test results are reported by this reporter.
  • This reporter should ideally be used in conjunction with another reporter.

@atlowChemi atlowChemi added doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. labels Apr 25, 2024
@dfperry5
Copy link

You're wanting to see this update in here:

The tap and spec reporters will print a summary of the coverage statistics.
?

I can take this and open a PR if that's OK?

@himself65
Copy link
Member Author

Thank you

@EliphazBouye
Copy link
Contributor

@cjihrig, @himself65 can you check if my pull request it's ok about this issue #52746

@jsonOdison
Copy link

is this issue this open ? can i work on it im a new guy

@phaux
Copy link

phaux commented Aug 3, 2024

The command to get console output AND coverage is quite long:

node --test \
  --test-reporter spec --test-reporter-destination stdout \
  --experimental-test-coverage --test-reporter lcov --test-reporter-destination lcov.info

@cjihrig
Copy link
Contributor

cjihrig commented Aug 13, 2024

This was closed by #53523.

@cjihrig cjihrig closed this as completed Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants