Closed
Description
I spent a long time trying to resolve this already, but can't find a decent solution. I started based on https://github.com/babel/babel/blob/master/packages/babel/src/api/register/node.js with process.env.running_under_istanbul
and got it executing but got stuck with no coverage information coming out.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
blakeembrey commentedon Mar 13, 2016
Istanbul 1.0 alpha.
silviogutierrez commentedon Jun 2, 2016
So I'm trying the alpha as you suggested, but I still get no info coming out. Here's the command:
./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --compilers ts:ts-node/register client/test.ts
Test passes fine, but it prints:
No coverage information was collected, exit without writing coverage information
at the bottom.Am I missing something? I'm on istanbul 1.0 alpha 2.
Thanks,
Silvio
silviogutierrez commentedon Jun 2, 2016
Think I solved it! For the curious, you need an
.istanbul.yml
file. Mine is currently:And it seemed to work.
sinedied commentedon Mar 22, 2017
I still can't make it work with
istanbul@1.1.0-alpha.1
and jasmine: sourcemaps are broken for the jasmine reporters and something crash after the test executions :(Without istanbul the tests run fin with jasmine.
jonaskello commentedon Mar 25, 2017
I found this comment very helpful. Basically use
nyc
command to run instanbul instead of theistanbul
command and it works.sinedied commentedon Mar 27, 2017
@jonaskello that's what I end up using,
nyc
works fine withts-node
without any pain.minor fix TypeStrong#2