0.1.0 • Published 10 years ago

gulp-mocha-browserify-suite v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

gulp-mocha-suite

Generates a suite file from gulp.src glob on the fly for Browserify and - subsequently - Mocha.

Install

npm i --save-dev gulp-mocha-browserify-suite

Usage

var generateSuite = require("gulp-mocha-browserify-suite");

gulp.task('test', function() {
  return gulp.src('./test/**/*_spec.js', {read: false})
    .pipe(generateSuite())
    .pipe(browserify())
    .pipe(concat('bundle.js'))
    .pipe(gulp.dest('./tmp'))
    .pipe(mocha());
});

API

mocha-browserify-suite(options)

opts.suiteFile

Type: String Default: suite.js

Name of your suite file, if you want to save it for some reason.

opts.testDir

Type: String Default: ./test

Relative path of your test dir, where browserify will start to require your modules from.

License

MIT License