test.js 266 B

1234567891011
  1. var path = require("path");
  2. var root = path.dirname(__dirname);
  3. module.exports = function(testModule) {
  4. var tests = testModule.exports[path.relative(root, testModule.filename)] = {};
  5. return function(name, func) {
  6. tests[name] = func;
  7. };
  8. };