-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
--all fails with ts-node (Typescript) #504
Comments
The other way I tried was to do the register in mocha using I'm coming from https://github.com/gotwarlost/istanbul and it works over there. This is the only thing keeping me from migrating all my projects from |
Sorry my bad. It works when I do the require in mocha! Time to migrate all my projects! |
@cvle nice! had a conversation with @wbyoung about this exact same issue earlier today: Where do you think we should document this caveat? would love help updating the README ... also, if you're feeling really ambitious, it would be amazing to get a TypeScript tutorial up here eventually for other folks. |
@cvle what do you meant with the require thing? |
Ahh, now I get it, the fix is remove the "require": [
"ts-node/register"
], and do it in this way
|
@juanpicado would you like to make a contribution to our docs? :) I haven't used TypeScript in a while, so it would be nice to keep the tutorial up to date on this for the latest versions of nyc and ts-node etc from someone who has been in the trenches. |
Sure ! There it goes |
Even with the register as part of mocha, I get the same error as with the register as part of nyc
But without |
This fixes "TypeError: Unable to require `.d.ts` file." from ts-node See also istanbuljs/nyc#504
The solution from @juanpicado helps, but it does not solve the problem. If I require ts-node in mocha instead of in nyc, the option |
|
I had similar problem with typescript globals.d.ts |
is failing my test coverage because i need a |
It did the trick for me, thanks @ilyadoroshin ! |
First of all, great job with this project!
So I have prefect code coverage using
ts-node
andnyc@10.1.2
. It was quiet easy to setup.But when I use
{ all: true }
it fails like this:Any idea why and how can we fix it?
The text was updated successfully, but these errors were encountered: