Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Doc updates

  • Loading branch information...
commit f814aa21a7dbc6314c154dab1f3a4d98c40ec3f0 1 parent 42ff5f5
@jrburke jrburke authored
Showing with 46 additions and 8 deletions.
  1. +46 −8 README.md
View
54 README.md
@@ -1,6 +1,6 @@
# AMD Tests
-This is the start of Asynchronous Module Definition
+A set of Asynchronous Module Definition
[AMD](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition) compliance
tests.
@@ -9,12 +9,12 @@ them in Node and Rhino.
# Configuration
-An implementation needs to have the following two files:
+An implementation needs to have the following two files in the **impl** directory:
* AMD loader implementation
* configure script
-The configure script should define the following variables:
+The configure script should define the following global variables:
* **config**: a function that accepts configuration parameters. Similar to the
RequireJS form of require({}).
@@ -26,18 +26,56 @@ signature.
* implemented: an object whose properties are the types of tests that the
loader expects to pass.
-The full list of test types:
+# Test Types
-* **basic**: Very basic loading of named modules that have dependency arrays.
+Each test type builds on the other: supporting later test types implies support
+for earlier test types.
-TODO: Add more.
+## basic
+
+Very basic loading of named modules that have dependency arrays.
+
+* Support for define.amd to indicate an AMD loader.
+* Named modules.
+* Dependency arrays.
+* Circular dependency support via the "exports" and "require" dependency.
+* Test for the CommonJS "module" dependency.
+
+## anon
+
+Similar tests to **basic**, but using anonymous modules.
+
+## funcString
+
+Tests parsing of definition functions via Function.prototype.toString() to
+get out dependencies. Used to support simplified module wrapping:
+
+```javascript
+ define(function (require) {
+ var a = require('a');
+ //Return the module definition.
+ return {};
+ });
+```
+
+## plugins
+
+Support for loader plugins.
+
+* Calling the same plugin resource twice and getting the same value.
+* Testing a plugin that implements normalize().
+* Testing a plugin that uses load.fromText().
# Running the tests
Run the tests through a web server. The URL should look like the following:
- http://127.0.0.1/amd-tests/tests/doh/runner.html?testUrl=../bootstrap&config=path/to/confi.js&impl=path/to/loader.js
+ http://127.0.0.1/amd-tests/tests/doh/runner.html?config=path/to/config.js&impl=path/to/loader.js
+
+Where both the config and impl paths are paths that are inside the **impl** directory in this project.
To run the tests using the version of RequireJS in this repository:
- http://127.0.0.1/amd-tests/tests/doh/runner.html?testUrl=../bootstrap&config=../../impl/requirejs/config.js&impl=../../impl/requirejs/require.js
+ http://127.0.0.1/amd-tests/tests/doh/runner.html?config=requirejs/config.js&impl=requirejs/require.js
+
+Or, use the **start.html** page for a page of quick links to start testing.
Please sign in to comment.
Something went wrong with that request. Please try again.