Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

Simplify simpleRequire #10

Open
tbosch opened this issue Mar 11, 2013 · 0 comments
Open

Simplify simpleRequire #10

tbosch opened this issue Mar 11, 2013 · 0 comments

Comments

@tbosch
Copy link
Contributor

tbosch commented Mar 11, 2013

Define a module like this:

 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant