test.js
542 Bytes
/**
* Module dependencies.
*/
var Runnable = require('./overrides/runnable');
var create = require('lodash.create');
/**
* Expose `Test`.
*/
module.exports = Test;
/**
* Initialize a new `Test` with the given `title` and callback `fn`.
*
* @api private
* @param {String} title
* @param {Function} fn
*/
function Test(title, fn) {
Runnable.call(this, title, fn);
this.pending = !fn;
this.type = 'test';
}
/**
* Inherit from `Runnable.prototype`.
*/
Test.prototype = create(Runnable.prototype, {
constructor: Test
});