tasks/grunt-run-phantom-specs.js
function startPhantom (specPath, cfg, cb) {
        var args = [specPath];
        if (cfg.verbose) {
            args.push("--verbose"); // custom, to be handled by spec runner
        }
        if (cfg.debug) {
            args.push("--debug"); // custom, to be handled by spec runner
        }
        if (cfg.color) {
            args.push("--color"); // custom, to be handled by spec runner
        }
        args.push("--xunitName=" + cfg.xunitName);
        var phantomProcess = grunt.util.spawn({
            cmd : 'phantomjs',
            args : args
        }, cb);

        phantomProcess.stdout.pipe(process.stdout);
        phantomProcess.stderr.pipe(process.stderr);
        return phantomProcess;
    }
function startPhantom (specPath, cfg, cb) {
        var args = [specPath];
        if (cfg.verbose) {
            args.push("--verbose"); // custom, to be handled by spec runner
        }
        if (cfg.debug) {
            args.push("--debug"); // custom, to be handled by spec runner
        }
        if (cfg.color) {
            args.push("--color"); // custom, to be handled by spec runner
        }
        args.push("--xunitName=" + cfg.xunitName);
        var phantomProcess = grunt.util.spawn({
            cmd : 'phantomjs',
            args : args
        }, cb);

        phantomProcess.stdout.pipe(process.stdout);
        phantomProcess.stderr.pipe(process.stderr);
        return phantomProcess;
    }
function startPhantom ( specPath , cfg , cb ) { var args = [ specPath ] ; if ( cfg . verbose ) { args . push ( "--verbose" ) ; // custom, to be handled by spec runner } if ( cfg . debug ) { args . push ( "--debug" ) ; // custom, to be handled by spec runner } if ( cfg . color ) { args . push ( "--color" ) ; // custom, to be handled by spec runner } args . push ( "--xunitName=" + cfg . xunitName ) ; var phantomProcess = grunt . util . spawn ( { cmd : 'phantomjs' , args : args } , cb ) ; phantomProcess . stdout . pipe ( process . stdout ) ; phantomProcess . stderr . pipe ( process . stderr ) ; return phantomProcess ; }
Boots phantomjs executable with `specPath` as a param, and executes
given callback `cb` when phantom process exits.
@param {String} specPath
@param {Object} cfg
@param {Function} cb
Boots phantomjs executable with specPath as a param and executes given callback cb when phantom process exits .