mirror of https://github.com/vitalif/phantomjs
![]() require.stub() can now accept a factory function instead of an object so that stubbed modules are initialized lazily: require.stub('zlib', function() { // initialized once, when zlib first required return { createGzip: function() { ... } }; }); http://code.google.com/p/phantomjs/issues/detail?id=1044 |
||
---|---|---|
.. | ||
dir | ||
node_modules | ||
a.js | ||
b.js | ||
coffee_dummy.coffee | ||
dummy.js | ||
empty.js | ||
json_dummy.json | ||
not_found.js | ||
require_spec.js | ||
stubber.js | ||
stubber_child.js | ||
thrower.js |