From 686106d544ecc3b6ffd4db2b665d3bc879a58d8c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 24 Sep 2012 16:22:07 -0400 Subject: ok --- node_modules/mocha/lib/test.js | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 node_modules/mocha/lib/test.js (limited to 'node_modules/mocha/lib/test.js') diff --git a/node_modules/mocha/lib/test.js b/node_modules/mocha/lib/test.js new file mode 100644 index 0000000..64a2f10 --- /dev/null +++ b/node_modules/mocha/lib/test.js @@ -0,0 +1,49 @@ + +/** + * 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 + ? '#' + : val; + }, 2); +}; \ No newline at end of file -- cgit v1.2.3-70-g09d2