Skip to content
This repository was archived by the owner on Aug 27, 2020. It is now read-only.

fix coverage for typescript (karma-remap-coverage) #5

Merged
merged 1 commit into from
Apr 1, 2017

Conversation

dvic
Copy link

@dvic dvic commented Mar 31, 2017

No description provided.

@dvic
Copy link
Author

dvic commented Mar 31, 2017

I tested this setup with a few classes and it seems to give correct coverage reports 😃

@Toilal
Copy link
Owner

Toilal commented Apr 1, 2017

Thanks !

There's still an issue with code typescript coverage due to the regexp lying in test/unit/index.ts that returns no modules to require

So currently your typescript code coverage only includes source files that are required by your tests, but i'll fix this asap.

(fixed with 42e242e)

@Toilal Toilal merged commit e21f745 into Toilal:master Apr 1, 2017
@Toilal
Copy link
Owner

Toilal commented Apr 1, 2017

Another problem : it displays after running unit tests the following message

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): SyntaxError: Unrecognized report type of "lcov".

any idea ?

@dvic
Copy link
Author

dvic commented Apr 1, 2017

I guess lcov is not supported by karma-remap-coverage and remap-istanbul: https://github.com/SitePen/remap-istanbul/blob/684fb0e88b3673a1563c61b59cf3091f54c1ddae/tests/unit/lib/writeReport.js#L18

So I'd suggest to use only lcononly and html (by the way: the folder for html is currently pointing to ./test/unit/coverage/lcov-report.

By the way: nice to see that all sources are included now, nice fix! 👍

@Toilal
Copy link
Owner

Toilal commented Apr 1, 2017

Yes that's what i've done with last commit : f506b51

Thank you too for help and engagement :)

@dvic
Copy link
Author

dvic commented Apr 1, 2017

You are welcome :)

By the way: did you advertise this project on vuejs/vue-cli#263 ? Others might also like it!

@Toilal
Copy link
Owner

Toilal commented Apr 1, 2017

Done thanks :)

I a near future, we could ask for this repository to become an official template hosted at https://github.com/vuejs-templates

@dvic dvic deleted the remap-coverage branch April 2, 2017 18:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants