summaryrefslogtreecommitdiff
path: root/node_modules/mocha/lib/hook.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/mocha/lib/hook.js')
-rw-r--r--node_modules/mocha/lib/hook.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/node_modules/mocha/lib/hook.js b/node_modules/mocha/lib/hook.js
new file mode 100644
index 0000000..3ed712e
--- /dev/null
+++ b/node_modules/mocha/lib/hook.js
@@ -0,0 +1,31 @@
+
+/**
+ * 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;