Integrate unused CommonJS tests where applicable #195
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
There has been an unused copy of The Official Specs for CommonJS lying around in our repository for who knows how long. They needed to be built using a python script and then manually executed in a browser.
This commit integrates all of those tests that also apply to our module system into our existing test suite for
require
&define
.Description
Adds adapted versions of the following CommonJs tests to our
test.require.js
:The hasOwnProperty test actually uncovered a bug in our module system implementation and thus is deactivated right now.
The following CommonJS tests were not applicable to Cordova's module system since it does not support cyclic dependencies at all:
The following CommonJS tests were already covered by tests in
test.require.js
:Future Work
I will follow up with a patch for the disabled
hasOwnProperty
test once this is merged.