tasks/grunt-run-phantom-specs.js
function startSpec (n, allSpecs, cfg, done) {
        var printId = n + 1;
        var specPath = allSpecs[n];
        var nSpecs = allSpecs.length;
        var msg = "Running spec file " + specPath + " [" + printId + "/" + nSpecs + "]";

        var bar = Array(process.stdout.columns).join("*");
        console.log("\n" + bar.cyan);
        console.log(alignCenter(msg).cyan);
        console.log(bar.cyan + "\n");

        var cb = getPhantomExitCb(n, allSpecs, cfg, done);
        startPhantom(specPath, cfg, cb);
    }
function startSpec (n, allSpecs, cfg, done) {
        var printId = n + 1;
        var specPath = allSpecs[n];
        var nSpecs = allSpecs.length;
        var msg = "Running spec file " + specPath + " [" + printId + "/" + nSpecs + "]";

        var bar = Array(process.stdout.columns).join("*");
        console.log("\n" + bar.cyan);
        console.log(alignCenter(msg).cyan);
        console.log(bar.cyan + "\n");

        var cb = getPhantomExitCb(n, allSpecs, cfg, done);
        startPhantom(specPath, cfg, cb);
    }
function startSpec ( n , allSpecs , cfg , done ) { var printId = n + 1 ; var specPath = allSpecs [ n ] ; var nSpecs = allSpecs . length ; var msg = "Running spec file " + specPath + " [" + printId + "/" + nSpecs + "]" ; var bar = Array ( process . stdout . columns ) . join ( "*" ) ; console . log ( "\n" + bar . cyan ) ; console . log ( alignCenter ( msg ) . cyan ) ; console . log ( bar . cyan + "\n" ) ; var cb = getPhantomExitCb ( n , allSpecs , cfg , done ) ; startPhantom ( specPath , cfg , cb ) ; }
Prints some info and relays config to start the n-th spec
@param {Integer} n
@param {Array} allSpecs
@param {Object} cfg
@param {Function} done
Prints some info and relays config to start the n - th spec