mirror of https://github.com/webpack/webpack.git
14 lines
372 B
JavaScript
14 lines
372 B
JavaScript
it("should replace a context with a manual map", function() {
|
|
function rqInContext(x) {
|
|
return require(x);
|
|
}
|
|
rqInContext("a").should.be.eql("a");
|
|
rqInContext("b").should.be.eql("b");
|
|
rqInContext("./c").should.be.eql("b");
|
|
rqInContext("d").should.be.eql("d");
|
|
rqInContext("./d").should.be.eql("d");
|
|
(function() {
|
|
rqInContext("module-b")
|
|
}.should.throw());
|
|
});
|