Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Include shared entry file in tests for real coverage #48

Merged
merged 3 commits into from
Dec 1, 2017

Conversation

dennisgl
Copy link
Contributor

@dennisgl dennisgl commented Dec 1, 2017

A common issue with nyc/istanbul is the coverage only covers as far as the test entry points reach but not the whole bundle, giving a false sense of high coverage. Here's a similar issue describing the problem: gotwarlost/istanbul#112

--include-all-sources in Istanbul v1, now --all in Istanbul v2/nyc extends the coverage area to the whole bundle. However, our bundles including test bundles are tree-shaked, therefore the option won't save the situation.

The changes here include shared entry point(currently src/main.js to test entry points passing to multi-entry-loader

Open for comments, given this basically eliminates tree-shaking for test bundles.

Copy link
Contributor

@ganemone ganemone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me. I imagine we probably don't care about tree shaking for test builds

@dennisgl
Copy link
Contributor Author

dennisgl commented Dec 1, 2017

!merge

@old-fusion-bot old-fusion-bot bot merged commit e057ccd into fusionjs:master Dec 1, 2017
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