-
Notifications
You must be signed in to change notification settings - Fork 33
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
Bug: typeCoverage config not working #5
Comments
@alexcanessa - I can try taking a stab at this |
@alexcanessa - PR is now open, looks like it will need some more work if you'd also like to see the ability to essentially "pass-through" any options that |
Nice. For now, it only gets interface LintOptions {
debug: boolean;
files?: string[];
oldProgram?: ts.Program;
strict: boolean;
enableCache: boolean;
ignoreCatch: boolean;
ignoreFiles?: string | string[];
fileCounts: boolean;
absolutePath?: boolean;
} I think we could have a separate issue for tracking separate options 🤷♂ |
Gotcha, that's not a bad idea - would make it easier to incrementally add those in if people seem to want to use it. Feel free to make changes where needed to this PR too! Side note: How do you feel about adding all-contributors? 😬 |
@tsaiDavid ha of course |
@all-contributors add @tsaiDavid for bug |
I've put up a pull request to add @tsaiDavid! 🎉 |
+1 to this! I added an |
Hi @alexcanessa I tried the In {
"typeCoverage": {
"ignoreCatch": true,
"ignoreUnread": true
}
} If I run: $ yarn type-coverage
58871 / 59260 99.34% But with The difference is because When I run
|
@danvk interesting. That's quite weird. |
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 is99%
. This works when using the CLI option, but not when using thetypeCoverage
property inpackage.json
.Provided config:
CLI output when using
typeCoverage
(wrong behavior):CLI output when using
--threshold
option (expected behavior):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
.Expected behaviour
Using
typeCoverage
should have parity withtypescript-coverage-report
CLI options.Screenshots
N/A
Environment
Additional context
N/A
The text was updated successfully, but these errors were encountered: