Skip to content

Include non-required files in test coverage % #21

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

Closed
thenickcox opened this issue Jan 11, 2016 · 1 comment
Closed

Include non-required files in test coverage % #21

thenickcox opened this issue Jan 11, 2016 · 1 comment
Labels

Comments

@thenickcox
Copy link

Istabul appears to include untested files in the test coverage percentage, but gulp-jsx-coverage doesn't appear to. Is there a way to set an includeUntested flag in the config?

@zordius
Copy link
Owner

zordius commented Jan 12, 2016

You can try to include all your target files into options.src then you can get coverage of not tested files. For example:

gulp.task('your_task_name', require('gulp-jsx-coverage').createTask({
    src: [
        // all test files
        'test/**/*.js',
        'test/components/*.jsx',
        // include all possible targets for whole picture of coverage
        'lib/*.js',
        'actions/*.js',
        'stores/*.js',
        'components/*.jsx',
    ],
    // other GJC options
    ....
}));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants