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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -