Skip to content

Commit dd8b78f

Browse files
authored
Integrate unused CommonJS tests where applicable (#195)
There has been an unused copy of [The Official Specs for CommonJS][1] 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`. Adds adapted versions of the following CommonJs tests to our `test.require.js`: absolute, transitive, determinism, method, nested, hasOwnProperty 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: cyclic, monkeys The following CommonJS tests were already covered by tests in `test.require.js`: - missing: covered by Test#005 - relative: covered by Test#012 - exactExports: covered by multiple tests [1]: https://github.com/commonjs/commonjs
1 parent a61952f commit dd8b78f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+86
-682
lines changed

.eslintignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
pkg/**
2-
tasks/vendor

.ratignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
tasks/vendor
2-
vendor
31
appveyor.yml

tasks/vendor/commonjs-tests/README.txt

-9
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/absolute/b.js

-1
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/absolute/program.js

-5
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/absolute/submodule/a.js

-3
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/absolute/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/cyclic/a.js

-4
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/cyclic/b.js

-4
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/cyclic/program.js

-10
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/cyclic/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/determinism/program.js

-3
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/determinism/submodule/a.js

-9
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/determinism/submodule/b.js

-2
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/determinism/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/exactExports/a.js

-3
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/exactExports/program.js

-4
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/exactExports/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/hasOwnProperty/hasOwnProperty.js

Whitespace-only changes.

tasks/vendor/commonjs-tests/modules/1.0/hasOwnProperty/program.js

-4
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/hasOwnProperty/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/hasOwnProperty/toString.js

Whitespace-only changes.

tasks/vendor/commonjs-tests/modules/1.0/method/a.js

-12
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/method/program.js

-8
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/method/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/missing/program.js

-8
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/missing/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/monkeys/a.js

-1
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/monkeys/program.js

-4
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/monkeys/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/nested/a/b/c/d.js

-3
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/nested/program.js

-3
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/nested/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/relative/program.js

-5
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/relative/submodule/a.js

-1
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/relative/submodule/b.js

-2
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/relative/test.js

-15
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/transitive/a.js

-1
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/transitive/b.js

-1
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/transitive/c.js

-3
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/transitive/program.js

-3
This file was deleted.

tasks/vendor/commonjs-tests/modules/1.0/transitive/test.js

-15
This file was deleted.

test/commonjs/.gitignore

-1
This file was deleted.

test/commonjs/README.txt

-11
This file was deleted.

0 commit comments

Comments
 (0)