diff --git a/site/docs/configuration.html b/site/docs/configuration.html index 2bfb7ba..4608414 100644 --- a/site/docs/configuration.html +++ b/site/docs/configuration.html @@ -221,26 +221,22 @@
extensions
- Extensions to load at runtime. The value is an array of strings - understood by the buster-module-loader which will be pinged when the - configuration is loaded. In most cases, these strings will be names of - installed NPM packages. If you are interested in developing extensions, - check out events and the - extensions page (which also + Extensions to load at runtime. The value is an array of extension + objects which will be pinged when the configuration is loaded. If you + are interested in developing extensions, check + out events and the + extensions page (which also lists known extensions).
- To configure an extension, provide an object in place of a string. The - object should have the extension identifier as keys and an object of - options as values: + To configure an extension, add settings under the name of the + extension:
config["Browser integration tests"] = {
- extensions: [
- "buster-jstestdriver",
- { "buster-coverage": {
- "outputDirectory": "coverage"
- }}
- ]
+ extensions: [require("buster-jstestdriver"), require("buster-coverage")],
+ "buster-coverage": {
+ "outputDirectory": "coverage"
+ }
};
"module-name#prop-name"
.buster.moduleLoader
require("buster-module-loader");
- Load Node modules and/or objects from inside Node modules using a simple - string identifier. -
-var moduleLoader = require("buster-module-loader");
-
-var assert = moduleLoader.load("buster-assertions").assert;
-
-// This is the same:
-var assert = moduleLoader.load("buster-assertions#assert");
- var object = moduleLoader.load(identifier)
- Load the module/object. The hash character ("#") separates module and - object. The object may be dotted, to reach inside nested object graphs. If - the string identifies an object that is not defined, the method throws an - error. -
-try {
- var mod = moduleLoader.load("module#nested.object");
-} catch (e) {
- console.log("Unable to load that object");
-}
- - The module loader could for instance be used to load reporters: -
-var reporter = moduleLoader.load("buster-test#reporters.xUnitConsole");
- buster.userAgentParser
var userAgentParser = require("buster-module-loader");
+ var userAgentParser = require("buster-user-agent-parser");
var ua = "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 " +
"(KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7";