diff options
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | test/mocha.opts | 1 | ||||
| -rw-r--r-- | test/test.js | 11 |
3 files changed, 13 insertions, 1 deletions
diff --git a/package.json b/package.json index a7a7a28..7ca400e 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ }, "scripts": { "pretest": "eslint lib tests", - "test": "mocha test --recursive", + "test": "mocha 'test/**/*.tests.js'", "prepublish": "make mammoth.browser.min.js" }, "license": "BSD-2-Clause" 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; + }; +}; |
