Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Working demo with babel6 + karma #104

Closed
fernandofleury opened this issue Dec 28, 2015 · 5 comments
Closed

Working demo with babel6 + karma #104

fernandofleury opened this issue Dec 28, 2015 · 5 comments

Comments

@fernandofleury
Copy link

I've bumping my head to make proper babel6 code coverage using isparta + karma.

Right now this is the error I get from it:

Post-processing using source maps Nothing mapped from file:

My karma config:

coverageReporter: {
      instrumenters: {
        isparta : require('isparta')
      },
      instrumenter: {
        '*.js': 'isparta'
      }
    },
babelPreprocessor: {
      options: {
        sourceMap: 'inline'
      }
    },
@trodrigues
Copy link

Same here, without karma. I just get No coverage information was collected, exit without writing coverage information with no other information or error output.

@fernandofleury
Copy link
Author

As in right now, I can generate a pseudo babel6 coverage:

image

As you can see, the generated coverage is not properly formatted. It's still covering es5 code.

@kt3k
Copy link

kt3k commented Jan 13, 2016

This is my example of generating es6 coverage report with karma + karma-browserify + isparta(v4).
https://github.com/kt3k/karma-browserify-isparta-example
https://codecov.io/github/kt3k/karma-browserify-isparta-example?branch=master

@fernandofleury
Copy link
Author

@kt3k That's a pretty clever ideia. I've managed to make it work as well!

@kt3k
Copy link

kt3k commented Jul 6, 2017

Currently istanbul's official babel-plugin-istanbul can instrument es6 code. I think that is now the most reliable way to create coverage report of es6 scripts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants