There are test cases for CommonJS bits that we should probably support, here:
The license for the test cases is here:
Proposal is to pull those into cordova-js in a new directory 'cjs-tests' under the 'thirdparty' directory.
We'll need to update the LICENSE file to indicate the licensing of that (and add the jasmine bits as a "drive by" fix).
To run the test cases, we'll need a separate loader/runner, as the tests have a distinct set of runtime requirements. I've already built and used a loader/runner for this with modjewel, so I'll pull those in, I guess under 'test' as 'cjs-tests'. Not sure if it's appropriate or desired to have these tests folded into some uber-test suite or not, given the different runtime set up, and the fact that these tests shouldn't need to be run all that often anyway - they are generally orthogonal to the existing cordova test cases.
In order to run the