From b5fef15290ef976620315eacd4cb762d07e1e7c3 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jul 2016 19:34:31 +0100 Subject: Support tests using exports UI --- test/mocha.opts | 1 + test/test.js | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 test/mocha.opts create mode 100644 test/test.js (limited to 'test') 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; + }; +}; -- cgit v1.2.3