Sha256: 4e9be17ed52ad432b1cf867918f5ca302888fd67c5693262588b026858d21309

Contents?: true

Size: 773 Bytes

Versions: 5

Compression:

Stored size: 773 Bytes

Contents

/**
 * Module dependencies.
 */

var Runnable = require('./runnable');

/**
 * Expose `Test`.
 */

module.exports = Test;

/**
 * Initialize a new `Test` with the given `title` and callback `fn`.
 *
 * @param {String} title
 * @param {Function} fn
 * @api private
 */

function Test(title, fn) {
  Runnable.call(this, title, fn);
  this.pending = !fn;
  this.type = 'test';
}

/**
 * Inherit from `Runnable.prototype`.
 */

Test.prototype.__proto__ = Runnable.prototype;

/**
 * Inspect the context void of private properties.
 *
 * @return {String}
 * @api private
 */

Test.prototype.inspect = function(){
  return JSON.stringify(this, function(key, val){
    return '_' == key[0]
      ? undefined
      : 'parent' == key
        ? '#<Suite>'
        : val;
  }, 2);
};

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stylus-source-0.27.1 vendor/node_modules/mocha/lib/test.js
stylus-source-0.27.0 vendor/node_modules/mocha/lib/test.js
stylus-source-0.26.1 vendor/node_modules/mocha/lib/test.js
stylus-source-0.26.0 vendor/node_modules/mocha/lib/test.js
stylus-source-0.25.0 vendor/node_modules/mocha/lib/test.js