We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Do you have a start-to-finish example you could post which included wiring up instanbul to run the instrumentation?
The text was updated successfully, but these errors were encountered:
To instrument istanbul I use browserify-istanbul in a gulp script like this (simplified):
var source = require('vinyl-source-stream'); var browserifyIstanbul = require('browserify-istanbul'); var mochaPhantomJS = require('gulp-mocha-phantomjs'); var istanbulReport = require('gulp-istanbul-report'); gulp.task('bundle-test', function() { return browserify({debug: true}) .transform(browserifyIstanbul()) .bundle() .pipe(source('test.js')) .pipe(gulp.dest('./bundle')) }); gulp.task('test', ['bundle-test'], function() { return gulp.src('test-runner.html', {read:false}) .pipe(mochaPhantomJS({ phantomjs: { hooks: 'mocha-phantomjs-istanbul', coverageFile: './coverage.json' } })) .on('finish', function() { gulp.src('./coverage.json') .pipe(istanbulReport({ dir: './coverage', reporters: ['html'] })); }); });
You'll have to make sure your test-runner.html runs tests from the bundle using mocha. See mocha-phantom-js for details on how to do that.
Sorry, something went wrong.
Awesome. Thanks for putting this together, I'll give it a shot here soon and post my experience.
No branches or pull requests
Do you have a start-to-finish example you could post which included wiring up instanbul to run the instrumentation?
The text was updated successfully, but these errors were encountered: