Closed rudijs closed 9 years ago
The entire project does not support them at the moment. Do you have a sample project you could share that reproduces this problem?
After looking into this a bit more I would definitely need support in the parser in order to implement this and Esprima does not have anything related to generators available yet.
@dylanb Thanks for the follow up Dylan.
Yeah I too think it's all in Esprima's end for this to be supported.
Where I was trying to implement this is over on some KoaJS middleware which is all es6 based stuff.
https://github.com/rudijs/koa-json-logger/blob/master/test/koa-json-logger.spec.js
For now on that I'll continue to use Istanbul - looking forward to revisiting this in the future.
Cheers.
@rudijs I have found that the esprima actually does have some support for generators, so I am going to reopen this issue while I research a potential solution.
ok @rudijs I have determined that this is not an issue with my module but instead is a problem with the entire Node.js system including Gulp.
Take a look at https://github.com/gulpjs/gulp/issues/437
Going to leave this open so I can make sure this works when solutions drop.
@dylanb thanks again for the follow up on this!
Closing this issue because it is in fact a shortcoming in esprima
Hi,
Currently code coverage for es6 generators won't work due to esprimajs not supporting them right?
Example err:
I'm tinkering with KoaJS and was trying to test some routes which use generator functions.
Gulp task is:
Using mocha manually on the command line (no coverage) the tests run OK with the --harmony flag.
Have tinkered with this (no joy):
Thanks.