-
-
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
KotlinJs Code Coverage #818
Comments
Do you have an example repo to reproduce this? :) From what you've shown, this is totally what I would try as well but I've never worked with KotlinJs before |
Would you like me to put one together? It takes a few minutes to update |
Same issue here. I've been trying to debug the root cause and for now I am inclined to think the problem is somehow hidden in source mapping. But not sure yet if it's indeed the root cause and which side causes the problem. Have you had any success with the problem, @shadowrider ? UPD: The correspondence between JS code and Kotlin code is quite tricky. Sourcemap generated by Kotlin is not ideal either. This results in failure to map JS code to Kotlin sources correctly. In particular, this condition in It seems there is a similar issue already filed for TypeScript: mozilla/source-map#261 Meanwhile, I think a fix can be done in we can see that iterating over line numbers until To be even more precise, I think |
@shadowrider sorry for dropping this for so long. Yes I would love to see a small demo repo to try things out on. My question is what is the/is there a babel equivalent for Kotlin? If your test runner is executing on transpiled js files with sourcemaps, then nyc should be able to map them back to the original source files. My first stab-in-the-dark guess would be to remove the cc @coreyfarrell any thoughts on this, specifically @Snipx's question? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I am interested in pursuing this again. Did anyone make any progress that was undocumented? |
I couldn't find anyone trying to use
nyc
to get code coverage for Kotlin files. I image it would work similar to how it works with TypeScript, wherenyc
uses source map files. Does anyone know what needs to be done in order for this to work? I would love to contribute tonyc
to support this feature, but currently have no idea where to start.Expected Behavior
Ability to get code coverage for Kotlin files which get transpiled to JS.
Observed Behavior
Coverage summary reports as
Unknown%
Things I've tried
Command:
nyc mocha path/to/test/bundle.test.js --require=source-map-support/register --recursive
Config:
If I require
babel-register
then I get errors asbabel
tried to go through Kotlin files.Forensic Information
Operating System: macos 10.12
Environment Information: OpenJDK 1.8.0_162, Kotlin 1.2.30, Node 8.11.1, NPM 5.6, Babel-Core 6.26, Mocha 5.1.1, NYC 11.7.1
The text was updated successfully, but these errors were encountered: