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

Failure instrumenting specific code #35

Open
Dhashin opened this issue Nov 1, 2016 · 2 comments
Open

Failure instrumenting specific code #35

Dhashin opened this issue Nov 1, 2016 · 2 comments

Comments

@Dhashin
Copy link

Dhashin commented Nov 1, 2016

Instrumentation failing on js files that have keywords "export" and/or "import".
Error: Line 1: Unexpected token

Trying to instrument a program and provide code coverage for selenium tests. Currently struggling with this.

@AlbanMinassian
Copy link

AlbanMinassian commented Dec 13, 2016

same error with this code

const im = require('istanbul-middleware'),
im.hookLoader(currentpath); // cover all files except under node_modules

no error if you write

const im = require('istanbul-middleware'); // <== ``;`` here, not ``,``
im.hookLoader(currentpath); // cover all files except under node_modules

you can close

@Dhashin
Copy link
Author

Dhashin commented Dec 13, 2016

I'm not experiencing the issue during execution of the driver. Experiencing the issue during instrumentation.
So when i run :
istanbul instrument "path_to_code" --output "output_path" --embed-source-true

then only do I experience this issue.
I think it has to do with support for ES6 and typescript, because I've seen similar problems experienced by other users for ISTANBUL, however i cant be sure

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

2 participants