attester/attester — pull request #80 by piuccio (2014-04-10 03:23:16+00:00)
Title: Custom test types

Change the way test types are loaded in order to allow creating custom plugins.
The logic now is the following

- try to resolve the test type inside the repository
- if missing require `attester-type`

The diff looks horrible, but in `at-test-type` and `mocha-test-type` I've simply indented the code.

The base change is

BEFORE
```js
var BaseTestType = require("../base-test-type");
var MyTestType = function () {};
util.inherits(MyTestType, BaseTestType);
module.exports = MyTestType;
```

AFTER
```js
module.exports = function (attester) {
var BaseTestType = attester.classes.BaseTestType;
var MyTestType = function () {};
util.inherits(MyTestType, BaseTestType);
return MyTestType;
};
```

In short, I've removed any `require()` of files outside of test-type folder.

Eventually the two test types in this repo can be moved to their own repository, it's enough to call them `attester-aria-templates` and `attester-mocha`, then the user can put what she needs inside `package.json`

The structure of test types resembles that of grunt plugins.