Skip to content

Commit

Permalink
Explain why module cache can be passed in as an option to the Loader …
Browse files Browse the repository at this point in the history
…constructor.
  • Loading branch information
Gozala committed Oct 26, 2011
1 parent d3c29f0 commit 499bb3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/api-utils/lib/cuddlefish.js
Expand Up @@ -117,6 +117,8 @@ const Loader = {
manifest: { value: options.manifest || {} },
sandboxes: { value: {} },

// Following property may be passed in (usually for mocking purposes) in
// order to override default modules cache.
modules: { value: options.modules || Object.create(Loader.modules) },
});
loader.require = this.require.bind(loader, options.loader);
Expand Down

0 comments on commit 499bb3a

Please sign in to comment.