Skip to content

Commit

Permalink
Integrate unused CommonJS tests where applicable (#195)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
raphinesse authored Apr 28, 2019
1 parent a61952f commit dd8b78f
Show file tree
Hide file tree
Showing 49 changed files with 86 additions and 682 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pkg/**
tasks/vendor
2 changes: 0 additions & 2 deletions .ratignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
tasks/vendor
vendor
appveyor.yml
9 changes: 0 additions & 9 deletions tasks/vendor/commonjs-tests/README.txt

This file was deleted.

1 change: 0 additions & 1 deletion tasks/vendor/commonjs-tests/modules/1.0/absolute/b.js

This file was deleted.

5 changes: 0 additions & 5 deletions tasks/vendor/commonjs-tests/modules/1.0/absolute/program.js

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/absolute/test.js

This file was deleted.

4 changes: 0 additions & 4 deletions tasks/vendor/commonjs-tests/modules/1.0/cyclic/a.js

This file was deleted.

4 changes: 0 additions & 4 deletions tasks/vendor/commonjs-tests/modules/1.0/cyclic/b.js

This file was deleted.

10 changes: 0 additions & 10 deletions tasks/vendor/commonjs-tests/modules/1.0/cyclic/program.js

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/cyclic/test.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/determinism/test.js

This file was deleted.

3 changes: 0 additions & 3 deletions tasks/vendor/commonjs-tests/modules/1.0/exactExports/a.js

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/exactExports/test.js

This file was deleted.

Empty file.

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/hasOwnProperty/test.js

This file was deleted.

Empty file.
12 changes: 0 additions & 12 deletions tasks/vendor/commonjs-tests/modules/1.0/method/a.js

This file was deleted.

8 changes: 0 additions & 8 deletions tasks/vendor/commonjs-tests/modules/1.0/method/program.js

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/method/test.js

This file was deleted.

8 changes: 0 additions & 8 deletions tasks/vendor/commonjs-tests/modules/1.0/missing/program.js

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/missing/test.js

This file was deleted.

1 change: 0 additions & 1 deletion tasks/vendor/commonjs-tests/modules/1.0/monkeys/a.js

This file was deleted.

4 changes: 0 additions & 4 deletions tasks/vendor/commonjs-tests/modules/1.0/monkeys/program.js

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/monkeys/test.js

This file was deleted.

3 changes: 0 additions & 3 deletions tasks/vendor/commonjs-tests/modules/1.0/nested/a/b/c/d.js

This file was deleted.

3 changes: 0 additions & 3 deletions tasks/vendor/commonjs-tests/modules/1.0/nested/program.js

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/nested/test.js

This file was deleted.

5 changes: 0 additions & 5 deletions tasks/vendor/commonjs-tests/modules/1.0/relative/program.js

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/relative/test.js

This file was deleted.

1 change: 0 additions & 1 deletion tasks/vendor/commonjs-tests/modules/1.0/transitive/a.js

This file was deleted.

1 change: 0 additions & 1 deletion tasks/vendor/commonjs-tests/modules/1.0/transitive/b.js

This file was deleted.

3 changes: 0 additions & 3 deletions tasks/vendor/commonjs-tests/modules/1.0/transitive/c.js

This file was deleted.

3 changes: 0 additions & 3 deletions tasks/vendor/commonjs-tests/modules/1.0/transitive/program.js

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/vendor/commonjs-tests/modules/1.0/transitive/test.js

This file was deleted.

1 change: 0 additions & 1 deletion test/commonjs/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions test/commonjs/README.txt

This file was deleted.

Loading

0 comments on commit dd8b78f

Please sign in to comment.