-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Better ES2015 Support #266
Conversation
I tried your sample using https://github.com/jamestalmage2/nyc-es2015
I think it would be great if we could figure out a way to create pluggable coverage instrumentation. Even when |
@jamestalmage really slick, should we just document @dtinth anything we can do to make nyc integrate more tightly with coverage? |
@bcoe You can use Make sure to set const Babel = require('babel-core')
const result = Babel.transform(code, {
babelrc: false,
plugins: [ require('babel-plugin-__coverage__') ],
filename: filename
}) The result is an ES6 |
I think it would be better to add first class support for coverage . Setting it up now is pretty convoluted, especially when it comes to include/exclude config. |
Interesting consequence of naming it |
@jamestalmage @dtinth this was my thinking too, could we create a shim with coverage that is a drop in replacement for istanbu.Instrumenter, and then make the instrumenter a configuration option in nyc? |
I think that's a good first step, but I'd love to generalize Someday, we are going to allow users to compile their sources in the main process in AVA. We currently do that for tests, and not loading up babel in each thread made a HUGE performance increase. The eventual plan is to analyze the dependency graph, much the same way browserify does, and precompile all the required sources for a test before forking. It should provide a huge speedup. Once that is done, I would love to integrate a first class Additionally, I think it would be awesome if AVA eventually integrated coverage into it's smart Finally, I think @novemberborn has some interesting ideas with Short term it may be better to go with an easy win that just allows for |
closing in favor of the work being done in #268 |
… coverage (#268) * feat: make nyc behave better when used with babel-plugin-__coverage__ (see #266) * feat: abstract test include/exclude logic into its own module * fix: add text-exclude dependency * fix: should have instrumenters in files list * fix: fix remapping issue with source-maps * fix: typo was causing argument not to propagate * docs: add section introducing __coverage__ for ES6/ES7 * docs: a couple small edits
The Problem
nyc has several open issues related to ES2015 support:
#265
#264
#215
#239
tapjs/tapjs#267
My Goal
Let's work towards adding better ES2015 support to nyc:
To get started, I would ask that folks who have run into issues submit pull requests with reproductions to this branch (which will act as a catch all for the time being).
We can build out some failing tests, and hopefully get things to a happier place.
CC: @jmdobry, @skozin, @xjamundx, @remy, @JaKXz