uitest.js is able to load a webpage into a frame, instrument that page and the javascript in that page (e.g. add additional scripts at the end of the document, ...) and execute actions on that page.
uitest.define('someModule', function(require) {
var otherModule = require('someOtherModule');
}
A module can load dependent modules using the given require argument in the callback.
Every require function has a cache behind it.
A require function can be created using uitest.requireFactory(parentRequire), optionally specifying a parent require function.
This should simply the code of simpleRequire.js a lot, and the parent relationship should also prevent double instantiation of non run modules when they are used by run modules (those under the run folder), which get instantiated for every test anew.
Define a module like this:
A module can load dependent modules using the given
require
argument in the callback. Everyrequire
function has a cache behind it.A require function can be created using
uitest.requireFactory(parentRequire)
, optionally specifying a parent require function.This should simply the code of
simpleRequire.js
a lot, and the parent relationship should also prevent double instantiation of non run modules when they are used by run modules (those under therun
folder), which get instantiated for every test anew.