javascript - How can I pass arbitrary parameters to my mocha tests with mochaPhantomJS & gulp? -
i'm using gulp & mochaphantomjs. i'd use same test html , run different tests against it. how can pass arbitrary parameters (by mean not phantom args) can retrieve within test javascript?
var gulp = require('gulp'); var mochaphantomjs = require('gulp-mocha-phantomjs'); gulp.task('testmisc', function() { return gulp.src('testmisc.html') .pipe(mochaphantomjs()); });
but clear want able is
gulp.task('testmisc-1', function() { return gulp.src('testmisc.html') .pipe(mochaphantomjs({whatever:1})); }); gulp.task('testmisc-2', function() { return gulp.src('testmisc.html') .pipe(mochaphantomjs({whatever:2})); });
Comments
Post a Comment