question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: typeCoverage config not working

See original GitHub issue

Describe the bug

In the provided example, I am expecting the tool to fail since the expected actual coverage is 92%, and my provided minimum is 99%. This works when using the CLI option, but not when using the typeCoverage property in package.json.

Provided config:

  "typeCoverage": {
    "atLeast": 99
  },

CLI output when using typeCoverage (wrong behavior):

image

CLI output when using --threshold option (expected behavior): image

As a side note, noticed the cache option to generate .ts-coverage does not seem to work either, I suspect it may be related.

To Reproduce See: https://codesandbox.io/s/crazy-sound-ujkcu

You can export the CodeSandbox as a zip and run locally after yarn install.

image

Expected behaviour Using typeCoverage should have parity with typescript-coverage-report CLI options.

Screenshots N/A

Environment

  • Tool version: 0.1.1
  • OS: MacOS 10.15.3
  • Node version: 12 LTS
  • Browser (if applicable): [e.g. chrome, safari]

Additional context N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcanessacommented, Nov 8, 2020

@danvk I just released this as part of v0.3.0

1reaction
danvkcommented, Oct 19, 2020

+1 to this! I added an ignoreUnread option to type-coverage recently and would like to use it with typescript-coverage-report.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Coverage - Confluence Mobile - Xray Documentation
Within a Requirement issue, a web panel named "Test Coverage" is provided by Xray. This panel allows users to cover an issue with...
Read more >
Troubleshooting Code Coverage - Visual Studio (Windows)
Learn how to resolve erroneous empty results messages when you expect Visual Studio to collect data for native and managed assemblies.
Read more >
Jest finds tests but doesn't collect coverage - Stack Overflow
Create a bug report here github.com/facebook/jest/issues and include everything above (system specs, include the repo, and what you've tried to ...
Read more >
Tools & Resources - Cisco
List of tools including CLI Analyzer, Bug Search, Software Research, TAC support BETA ... Tool for research and troubleshooting related to software bugs....
Read more >
[Coverage] Troubleshooting guide for .NET code coverage ...
As explained in our Test Coverage documentation, SonarQube/SonarCloud does not run tests or generate reports, but imports pre-generated ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found