Skip to content

Generates a suite file for Mocha on the fly from a gulp.src glob what you can pass to browserify for bundling

License

Notifications You must be signed in to change notification settings

tarsolya/gulp-mocha-browserify-suite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Generates a suite file for Mocha on the fly from a gulp.src glob what you can pass to browserify for bundling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published