Skip to content
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

Async await support #321

Closed
furstenheim opened this issue Apr 25, 2017 · 8 comments
Closed

Async await support #321

furstenheim opened this issue Apr 25, 2017 · 8 comments

Comments

@furstenheim
Copy link

Karma coverage is not able to parse files that contain async/await I get a parsing error:

ERROR [preprocessor.coverage]: Line 15: Unexpected token function

Thanks

@furstenheim
Copy link
Author

As a workaround one can use https://github.com/istanbuljs/babel-plugin-istanbul for instrumenting the code and karma-coverage to make the coverage

@lucis
Copy link

lucis commented Aug 23, 2017

up

@lucis
Copy link

lucis commented Aug 23, 2017

@furstenheim Could you explain how you configured this plugin?

@furstenheim
Copy link
Author

furstenheim commented Aug 23, 2017

@lucianolucianoluciano you can take a look at the karma conf of the project. It is actually quite simple. As a babel plugin you add istanbul and that will add the information for the coverageReporter. Don't forget to run

npm install --save-dev babel-plugin-instanbul

@1000i100
Copy link

Are you planning to add async/await native support in karma-coverage ?

I use them in my project without babel conversion, so it could be helpfull !

until then, il will drop karma-coverage and cross test with jest instead for coverage.

@johnjbarton
Copy link
Contributor

To update the language support, istanbul needs to be updated to pull esprima 4.x.

@kierans
Copy link

kierans commented Feb 8, 2018

It maybe that Istanbul will not update the esprima version because istanbul has been deprecated in favour of istanbuljs (which does support async/await).

@anthony-redFox
Copy link
Collaborator

should be done in version 2.X, fill free to reopen if still have a error

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

No branches or pull requests

6 participants