attester/attester — pull request #73 by divdavem (2014-02-04 17:21:12+00:00)
Title: Adding some support for require syntax in Aria Templates tests.

A [future version](https://github.com/divdavem/ariatemplates/tree/noderIntegration) of Aria Templates will integrate [noder-js](https://github.com/ariatemplates/noder) and allow the use of `require` in any module (when using the new syntax).
This pull request makes attester compatible with the use of this new syntax inside tests.
It is needed because, before this pull request, attester extracted the classpath from a test file by executing that file in a special environment (containing a fake `Aria.classDefinition` method to extract the class definition, but with no `require` function available). This is no longer possible with the new syntax, and adding a fake `require` function to that special environment would not be easy.
The new algorithm, which is only used when the new syntax is detected, parses the file with Uglify-JS and extracts the required information (classpath of the current class and logical path of the parent class), without executing the file.
In case the file is detected to be a test suite, extending directly from `require("ariatemplates/jsunit/TestSuite")`, only the constructor function is executed, in a special environment, to get the classpaths of the tests included in the test suite.