Sha256: a4f2e71930dbf6a9ccd70de794c4bbedbe6db2bcbeb6793d24258e3846050073

Contents?: true

Size: 809 Bytes

Versions: 5

Compression:

Stored size: 809 Bytes

Contents

/**
 * Expose `Context`.
 */

module.exports = Context;

/**
 * Initialize a new `Context`.
 *
 * @api private
 */

function Context(){}

/**
 * Set the context `Runnable` to `runnable`.
 *
 * @param {Runnable} runnable
 * @return {Context}
 * @api private
 */

Context.prototype.runnable = function(runnable){
  this._runnable = runnable;
  return this;
};

/**
 * Set test timeout `ms`.
 *
 * @param {Number} ms
 * @return {Context} self
 * @api private
 */

Context.prototype.timeout = function(ms){
  this._runnable.timeout(ms);
  return this;
};

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

Context.prototype.inspect = function(){
  return JSON.stringify(this, function(key, val){
    return '_runnable' == key
      ? undefined
      : val;
  }, 2);
};

Version data entries

5 entries across 5 versions & 1 rubygems

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