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

support shorthand for 100% test coverage check #329

Closed
gr2m opened this issue Sep 16, 2021 · 2 comments · Fixed by #332
Closed

support shorthand for 100% test coverage check #329

gr2m opened this issue Sep 16, 2021 · 2 comments · Fixed by #332

Comments

@gr2m
Copy link
Contributor

gr2m commented Sep 16, 2021

  • Version: v16.9.1
  • Platform: Mac OS X 10.15.7 (19H1417)

I really like tap's --100 flag. Could we add something similar to c8? It would turn

c8 --check-coverage --lines 100 --functions 100 --branches 100 --statements 100  node test.js

into

c8 --100 node test.js
@bcoe
Copy link
Owner

bcoe commented Sep 23, 2021

@gr2m I like this idea 👍

@gr2m
Copy link
Contributor Author

gr2m commented Oct 1, 2021

@bcoe I'm not quite sure how the --check-coverage parameter works.

I we want support both

  1. c8 check-coverage --100
  2. c8 --100 npm test

but I'm not sure how. I tried to use yargs.middleware() but the code does not seem to be executed at all. See my WIP PR at #332

@bcoe bcoe closed this as completed in #332 Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants