Ts-node: Using nyc (istanbul) with ts-node/register don't check coverage properly in versions from 3.3.0

Created on 3 Apr 2018  路  3Comments  路  Source: TypeStrong/ts-node

Using nyc for checking code coverage doesn't cover class field declarations when using ts-node > 3.3.0.
image

Issue description in nyc repository:
https://github.com/istanbuljs/nyc/issues/802

Downgrading ts-node package to version 3.3.0 fixes the issue.

help wanted research

Most helpful comment

@cibergarri Thanks for the response! I'll look into doing a release in the next week or two defaulting the primary mode back to --type-check with --fast being opt-in. External tooling like this makes it trickier to select an appropriate default. The ts-node/register/type-check endpoint will continue existing in all future releases for explicit support.

All 3 comments

Can you somehow test it by requiring ts-node/register/type-check instead? It seems there's a few unhandled issues with the non-type-check mode in these edge cases.

hi @blakeembrey!
Yes, It works! I Just want to point out that there is a typo on your comment.

For those who come with the same issue, it should be:
"require": [ "ts-node/register/type-check" ],

(register instead of require)

Anyway, thank you very much for your help, I really appreciate your fast answer.

@cibergarri Thanks for the response! I'll look into doing a release in the next week or two defaulting the primary mode back to --type-check with --fast being opt-in. External tooling like this makes it trickier to select an appropriate default. The ts-node/register/type-check endpoint will continue existing in all future releases for explicit support.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

motss picture motss  路  4Comments

joshua-tj picture joshua-tj  路  3Comments

watzon picture watzon  路  3Comments

Borewit picture Borewit  路  3Comments

nehalist picture nehalist  路  3Comments