Updated shape syntax

Coverage instrumentation in tests
This commit is contained in:
knsv
2014-11-27 18:21:15 +01:00
parent 289329736d
commit fe1c78ca29
12 changed files with 197 additions and 115 deletions

View File

@@ -5,6 +5,7 @@ var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var extReplace = require('gulp-ext-replace');
var rename = require('gulp-rename');
var istanbul = require('gulp-istanbul');
gulp.task('jison2', function() {
@@ -34,6 +35,17 @@ gulp.task('jasmine',['jison'], function () {
.pipe(jasmine());
});
gulp.task('coverage', function (cb) {
gulp.src(['src/**/*.js', '!src/**/*.spec.js'])
.pipe(istanbul()) // Covering files
.on('finish', function () {
gulp.src(['src/**/*.spec.js'])
.pipe(jasmine())
.pipe(istanbul.writeReports()) // Creating the reports after tests runned
.on('end', cb);
});
});
var browserify = require('gulp-browserify');
// Basic usage