镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Description

@himself65

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

Activity

  1. added
    test_runnerIssues and PRs related to the test runner subsystem.
    on Apr 24, 2024
  2. cjihrig commented on Apr 24, 2024

    @cjihrig
    Contributor

    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.
  3. added
    docIssues and PRs related to Node.js documentation.
    good first issueIssues that are suitable for first-time contributors.
    on Apr 25, 2024
  4. dfperry5 commented on Apr 29, 2024

    @dfperry5

    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?

  5. himself65 commented on Apr 29, 2024

    @himself65
    MemberAuthor

    Thank you

  6. eliphazbouye commented on Apr 29, 2024

    @eliphazbouye
    Contributor

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

  7. jsonOdison commented on May 15, 2024

    @jsonOdison

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

  8. linked a pull request that will close this issueCoverage reporter shallow error doc #52746on May 15, 2024
  9. phaux commented on Aug 3, 2024

    @phaux

    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
    
  10. cjihrig commented on Aug 13, 2024

    @cjihrig
    Contributor

    This was closed by #53523.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.test_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions