test.js 472 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * Module dependencies.
  3. */
  4. var Runnable = require('./runnable');
  5. /**
  6. * Expose `Test`.
  7. */
  8. module.exports = Test;
  9. /**
  10. * Initialize a new `Test` with the given `title` and callback `fn`.
  11. *
  12. * @param {String} title
  13. * @param {Function} fn
  14. * @api private
  15. */
  16. function Test(title, fn) {
  17. Runnable.call(this, title, fn);
  18. this.pending = !fn;
  19. this.type = 'test';
  20. }
  21. /**
  22. * Inherit from `Runnable.prototype`.
  23. */
  24. Test.prototype.__proto__ = Runnable.prototype;