mirror of
https://github.com/seejohnrun/haste-server.git
synced 2024-11-01 11:31:22 +00:00
33 lines
472 B
JavaScript
33 lines
472 B
JavaScript
|
|
||
|
/**
|
||
|
* 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;
|