gulp-mocha-browserify-suite

0.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-mocha-browserify-suite

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • tarsolya