All Projects → jeroenouw → liftr-tscov

jeroenouw / liftr-tscov

Licence: MIT License
Check the type coverage of any TypeScript project with this easy npm package

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to liftr-tscov

dts-css-modules-loader
A small Webpack loader to generate typings for your CSS-Modules
Stars: ✭ 44 (+57.14%)
Mutual labels:  typings
LocalCoverage.jl
Trivial functions for working with coverage for packages locally.
Stars: ✭ 55 (+96.43%)
Mutual labels:  coverage
javacard-gradle-template
JavaCard project template for building CAP and running JCardSim with gradle + coverage
Stars: ✭ 27 (-3.57%)
Mutual labels:  coverage
discord-api-types
Up to date Discord API Typings, versioned by the API version
Stars: ✭ 270 (+864.29%)
Mutual labels:  typings
example-scala
Scala coverage example
Stars: ✭ 33 (+17.86%)
Mutual labels:  coverage
example-node-and-browser-qunit-ci
Example project with continuous integration for linting and cross-browser testing of isomorphic JavaScript.
Stars: ✭ 18 (-35.71%)
Mutual labels:  coverage
pytest-coverage-comment
Comments a pull request with the pytest code coverage badge and full report
Stars: ✭ 32 (+14.29%)
Mutual labels:  coverage
Cake.Coverlet
Coverlet extensions for Cake Build
Stars: ✭ 39 (+39.29%)
Mutual labels:  coverage
react-dts-generator
Typescript definitions for React components.
Stars: ✭ 18 (-35.71%)
Mutual labels:  typings
covviz
Multi-sample genome coverage viewer to observe large, coverage-based anomalies alongside annotations and sample metadata
Stars: ✭ 42 (+50%)
Mutual labels:  coverage
tikione-jacocoverage
NetBeans module that provides JaCoCo code coverage for Ant based Java SE, Java EE and NetBeans Module projects (JDK5,6,7,8 compatible).
Stars: ✭ 25 (-10.71%)
Mutual labels:  coverage
mutant-swarm
Mutation testing framework and code coverage for Hive SQL
Stars: ✭ 20 (-28.57%)
Mutual labels:  coverage
cargo-llvm-cov
Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
Stars: ✭ 181 (+546.43%)
Mutual labels:  coverage
rollup-plugin-istanbul
Seamless integration between Rollup and Istanbul
Stars: ✭ 39 (+39.29%)
Mutual labels:  coverage
libfuzzer-cov
Get actually nice HTML coverage overview on libfuzzer runs
Stars: ✭ 20 (-28.57%)
Mutual labels:  coverage
react-unit-test-practice
No description or website provided.
Stars: ✭ 16 (-42.86%)
Mutual labels:  coverage
nvim-goc.lua
Go Coverage for Neovim
Stars: ✭ 17 (-39.29%)
Mutual labels:  coverage
css-coverage.js
🎨 Code Coverage for your CSS!
Stars: ✭ 23 (-17.86%)
Mutual labels:  coverage
gobco
Measure branch coverage of golang tests
Stars: ✭ 36 (+28.57%)
Mutual labels:  coverage
instrumentation
Assorted pintools
Stars: ✭ 24 (-14.29%)
Mutual labels:  coverage

TSCOV - Check the type coverage of any TypeScript project with this easy npm package

The Liftr framework provides a structure and tools to build API's with TypeScript and express. This repo/package is for the coverage of types in TypeScript.

tscov npmversion npmlicense downloads

Quick start

Globally

First globally install @liftr/tscov by running the following in the command line.

npm i @liftr/tscov -g

cd <your-repo-location>

# To run the coverage of the types.
tscov

Project

Go to your local project in the command line.
Then install @liftr/tscov as devDependency by running:

npm i @liftr/tscov --save-dev

And set tscov up by adding an extra npm script in your package.json like this:

"scripts": {
    "tscov": "tscov -m <number>"
},

Then you could run this with:

npm run tscov

How to use

You can use the following commands in the command line or in a project as npm script:

# Show max reachable coverage and covered/uncovered types (default 90% minimal coverage)
tscov

# Define your minimum wanted coverage % by replacing `<number>` (0-100) with `95` for example 
tscov -m <number>
tscov --min-coverage <number>

# Show all uncovered types  
tscov -d
tscov --details

# Test specific folder
tscov -p <path-to-folder/foldername>
tscov --project <path-to-folder/foldername>

# Testing specific files
tscov -p <path-to-folder/foldername> -f <filename>.ts
tscov --project <path-to-folder/foldername> --file <filename>.ts

# Start debugging
tscov --debug

# Show version
tscov -v
tscov --version

# Show all available options
tscov -h
tscov --help

Example output

Example by running this command: tscov --min-coverage=95.

  _____   ____     ____    ___   __     __
 |_   _| / ___|   / ___|  / _ \  \ \   / /
   | |   \___ \  | |     | | | |  \ \ / /
   | |    ___) | | |___  | |_| |   \ V /
   |_|   |____/   \____|  \___/     \_/

The TypeScript CLI to calculate type coverage


----------------- coverage ------------------
3337 - max reachable type coverage
3287 - types covered
50 - types uncovered

98.50% - coverage percentage
You can run "tscov --details" to show all uncovered types.

Contributing

Want to file a bug, contribute some code, or improve documentation? Feel free to place an issue.

First fork this project.

git clone <your-forked-repo>
npm install

git checkout -b my-fix
# fix some code...

git commit -m "added this feature"
git push origin my-fix

Lastly, open a pull request on Github.

The following npm script are available

  • npm start - create build, install globally and run tscov
  • npm run build - create build
  • npm run global - install globally and run tscov
  • npm run link-upstream - add remote
  • npm run sync - fetch, checkout, merge and push
  • npm run reset - removes node modules, package-lock.json, lib and re-installs everything.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].