webpack/test/cases/context/issue-524/index.js

11 lines
261 B
JavaScript
Raw Normal View History

2014-10-12 17:24:42 +08:00
it("should support an empty context", function() {
var c = require.context(".", true, /^nothing$/);
c.id.should.be.type("number");
(function() {
c.resolve("");
}).should.throw();
(function() {
c("");
}).should.throw();
c.keys().should.be.eql([]);
});