aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-07-03 19:34:31 +0100
committerMichael Williamson <mike@zwobble.org>2016-07-03 19:34:31 +0100
commitb5fef15290ef976620315eacd4cb762d07e1e7c3 (patch)
tree41b17437a111943ea2f8afa3fbd585bb2f93261f /test
parent0b56dfce42c3944cce47e284608e6806f4c839c3 (diff)
Support tests using exports UI
Diffstat (limited to 'test')
-rw-r--r--test/mocha.opts1
-rw-r--r--test/test.js11
2 files changed, 12 insertions, 0 deletions
diff --git a/test/mocha.opts b/test/mocha.opts
new file mode 100644
index 0000000..e3ca00a
--- /dev/null
+++ b/test/mocha.opts
@@ -0,0 +1 @@
+--ui exports
diff --git a/test/test.js b/test/test.js
new file mode 100644
index 0000000..e48e57d
--- /dev/null
+++ b/test/test.js
@@ -0,0 +1,11 @@
+var path = require("path");
+
+
+var root = path.dirname(__dirname);
+
+module.exports = function(testModule) {
+ var tests = testModule.exports[path.relative(root, testModule.filename)] = {};
+ return function(name, func) {
+ tests[name] = func;
+ };
+};