Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typescript-coverage-report

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-coverage-report

Node command tool to generate TypeScript coverage report.

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-5.73%
Maintainers
1
Weekly downloads
 
Created
Source

TypeScript coverage report

npm version npm downloads standard-readme compliant MIT Licence

Node command tool to generate TypeScript coverage report.

Background

This package fills the gap of a missing type coverage reporting tool which is present in the Flow ecosystem, strongly inspired by the amazing work done by flow-coverage-report and using data generated by type-coverage.

See Also

I've published an article on How I built a TS coverage report tool, which explains more the roadmap and the resoning.

Install

You can install it globally or locally. My advice is to install it as a project dependency and create a script in your package.json.

yarn add --dev typescript-coverage-tool

# npm users
npm install --save-dev typescript-coverage-tool

Usage

If you installed locally, add this in your scripts section of the package.json.

"scripts": {
  "ts-coverage": "typescript-coverage-report"
}

Then run:

yarn ts-coverage

# npm users
npm run ts-coverage

To set the threshold (80% by default) required, use the --threshold option.

yarn ts-coverage --threshold=99

or, following the type-coverage configuration, you can specify it in your package.json.

"typeCoverage": {
  "atLeast": 90
}

terminal table

summary page

details page

Options

The CLI accepts a list of arguments:

OptionDescriptionDefault value
-t, --threshold [number]The minimum percentage of coverage required.80
-o, --outputDir [string]The output directory where to generate the report.coverage-ts
-s, --strict [boolean]Run the check in strict mode.false
-d, --debug [boolean]Show debug information.false

Maintainers

@alexcanessa

Contributing

Feel free to dive in! Open an issue or submit PRs.

On this project we follow the Contributor Covenant Code of Conduct.

Commit messages

This project follows the Angular commit messages, but it's very open to emojis 🤯.

Licence

MIT @ Alessandro Canessa

forthebadge

FAQs

Package last updated on 26 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc