Browse files

A little AMD commentary

  • Loading branch information...
1 parent ae1f6c7 commit 0726c5301047c6b649f4afe495589a4d0bcd83a7 Christian Johansen committed Mar 27, 2012
Showing with 14 additions and 1 deletion.
  1. +14 −1 site/docs/extensions.html
15 site/docs/extensions.html
@@ -39,7 +39,9 @@ <h3 id="jstestdriver">buster-jstestdriver</h3>
<h3 id="amd">buster-amd</h3>
- Use an AMD loader to test asynchronous modules.
+ Use an AMD loader to test asynchronous modules. You must provide your own
+ loader. By default, a loader that provides <code>require(deps, callback)</code>
+ is assumed. This will eventually be pluggable.
<p><code>npm install buster-amd</code></p>
@@ -53,6 +55,17 @@ <h3 id="amd">buster-amd</h3>
tests: ["test/**/*.js"],
extensions: [require("buster-amd")]
+ Note that you list your tests and sources as normal. Your sources must be
+ specified in the configuration even if you will <code>require</code> them from
+ your tests, otherwise, Buster will not make them available on the test server.
+ Your tests will drive the show. To run tests with the AMD extension, your
+ tests should be wrapped in a call to <code>define</code>, which pulls in
+ dependencies (i.e. your modules) and in the callback defines specs/test cases
+ as usual.
The AMD extension has one configuration option: a path mapper. The path mapper

0 comments on commit 0726c53

Please sign in to comment.