UNPKG

hex2rgb

Version:

Converts hex color to rgb and calculates appropriate corresponding foreground.

16 lines (15 loc) 538 B
var gulp = require('gulp'); var istanbul = require('gulp-istanbul'); // We'll use mocha here, but any test framework will work var mocha = require('gulp-mocha'); gulp.task('test', function (cb) { gulp.src(['index.js']) .pipe(istanbul()) // Covering files .pipe(istanbul.hookRequire()) // Force `require` to return covered files .on('finish', function () { gulp.src(['test/*.js']) .pipe(mocha()) .pipe(istanbul.writeReports()) // Creating the reports after tests run .on('end', cb); }); });