Skip to content

Fix test code coverage reporting#850

Merged
timdorr merged 1 commit into
reduxjs:masterfrom
jacobdfriedmann:fix-test-coverage
Feb 16, 2018
Merged

Fix test code coverage reporting#850
timdorr merged 1 commit into
reduxjs:masterfrom
jacobdfriedmann:fix-test-coverage

Conversation

@jacobdfriedmann

Copy link
Copy Markdown
Contributor

Fixes #828 by updating the nyc configuration.

This builds on the work of @IlyaRucavitcyn's fork. Turns out the issue was the npm test command is setting the BABEL_ENV environment variable to commonjs, which doesn't have the required istanbul plugin.

To fix this, I just added the commonjs env plugin to the babel test environment and then switched npm test to use BABEL_ENV=test.

It now seems to produce an accurate coverage report and coverage.lcov is no longer empty after running npm run coverage.

screen shot 2018-01-06 at 8 43 47 am

@timdorr

timdorr commented Feb 16, 2018

Copy link
Copy Markdown
Member

Sorry, I forgot to look at this! Thanks!

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

Successfully merging this pull request may close these issues.

test cases coverge coverage.Icov is empty

2 participants