lib/reporters/cli/cli-utils.js
function (runOptions) {
        var dimension = cliUtils.dimension(),
            options = {
                depth: 25,

                maxArrayLength: 100, // only supported in Node v6.1.0 and up: https://github.com/nodejs/node/pull/6334

                colors: !cliUtils.noTTY(runOptions.color),

                // note that similar dimension calculation is in utils.wrapper
                // only supported in Node v6.3.0 and above: https://github.com/nodejs/node/pull/7499
                breakLength: ((dimension.exists && (dimension.width > 20)) ? dimension.width : 60) - 16
            };

        return function (item) {
            return inspect(item, options);
        };
    }
function (runOptions) {
        var dimension = cliUtils.dimension(),
            options = {
                depth: 25,

                maxArrayLength: 100, // only supported in Node v6.1.0 and up: https://github.com/nodejs/node/pull/6334

                colors: !cliUtils.noTTY(runOptions.color),

                // note that similar dimension calculation is in utils.wrapper
                // only supported in Node v6.3.0 and above: https://github.com/nodejs/node/pull/7499
                breakLength: ((dimension.exists && (dimension.width > 20)) ? dimension.width : 60) - 16
            };

        return function (item) {
            return inspect(item, options);
        };
    }
function ( runOptions ) { var dimension = cliUtils . dimension ( ) , options = { depth : 25 , maxArrayLength : 100 , // only supported in Node v6.1.0 and up: https://github.com/nodejs/node/pull/6334 colors : ! cliUtils . noTTY ( runOptions . color ) , // note that similar dimension calculation is in utils.wrapper // only supported in Node v6.3.0 and above: https://github.com/nodejs/node/pull/7499 breakLength : ( ( dimension . exists && ( dimension . width > 20 ) ) ? dimension . width : 60 ) - 16 } ; return function ( item ) { return inspect ( item , options ) ; } ; }
A CLI utility helper method that generates a color inspector function for CLI reports.

@param {Object} runOptions - The set of run options acquired via the runner.
@returns {Function} - A function to perform utils.inspect, given a sample item, under pre-existing options.
A CLI utility helper method that generates a color inspector function for CLI reports .