UNPKG

webpack

Version:

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.

11 lines 262 B
it("should replace a context with a new resource and reqExp", function(done) { function rqInContext(x, callback) { require([x], function(x) { callback(x); }); } rqInContext("replaced", function(r) { r.should.be.eql("ok"); done(); }); });