Forked from original gulp-casperjs with minor updates
A gulp plugin for running CasperJS scripts
npm install --save-dev gulp-casperjs-options
To add logging output option:
var casperJs = require('gulp-casperjs-options');
gulp.task('logTest', function (){
gulp.src('test.js')
.pipe(casperjs({
xunit: 'log.xml'
}));
});
var casperJs = require('gulp-casperjs');
gulp.task('test', function () {
gulp.src('Globs of test files')
.pipe(casperJs()); //run casperjs test
});
To change the command (default: test
) use parameter command
:
var casperJs = require('gulp-casperjs');
gulp.task('casperCmd', function () {
gulp.src('test.js')
.pipe(casperJs({command:''})); //run capserjs test.js
});
Command can be array
or string
.
If command has value which cast to false
, this parameter will be ignored.
To hide output from CasperJS use parameter outputLog
:
var casperJs = require('gulp-casperjs');
gulp.task('casperCmd', function () {
gulp.src('test.js')
.pipe(casperJs({outputLog: false})); //CasperJS output not show
});
Default value is true
The MIT License (MIT)