Skip to content
Browse files

Explain why module cache can be passed in as an option to the Loader …

…constructor.
  • Loading branch information...
1 parent d3c29f0 commit 499bb3a7e82b98bdbfc30252acb6d1ec42af9a87 @Gozala committed Oct 26, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 packages/api-utils/lib/cuddlefish.js
View
2 packages/api-utils/lib/cuddlefish.js
@@ -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);

0 comments on commit 499bb3a

Please sign in to comment.
Something went wrong with that request. Please try again.