Sha256: 908679beb5c4a82e46da6e2b53484ecc5aa9568d497da171999827bca78364da
Contents?: true
Size: 715 Bytes
Versions: 8
Compression:
Stored size: 715 Bytes
Contents
/** * Module dependencies. */ var Runnable = require('./runnable'); /** * Expose `Hook`. */ module.exports = Hook; /** * Initialize a new `Hook` with the given `title` and callback `fn`. * * @param {String} title * @param {Function} fn * @api private */ function Hook(title, fn) { Runnable.call(this, title, fn); this.type = 'hook'; } /** * Inherit from `Runnable.prototype`. */ Hook.prototype.__proto__ = Runnable.prototype; /** * Get or set the test `err`. * * @param {Error} err * @return {Error} * @api public */ Hook.prototype.error = function(err){ if (0 == arguments.length) { var err = this._error; this._error = null; return err; } this._error = err; };
Version data entries
8 entries across 8 versions & 1 rubygems