webpack/test/configCases/externals/optional-externals-umd2-mixed/index.js

11 lines
254 B
JavaScript
Raw Normal View History

2014-08-27 22:25:48 +08:00
it("should not fail on optional externals", function() {
require("external2");
try {
require("external");
} catch(e) {
e.should.be.instanceof(Error);
e.code.should.be.eql("MODULE_NOT_FOUND");
return;
}
throw new Error("It doesn't fail");
});