webpack/test/cases/parsing/requirejs/index.js

21 lines
505 B
JavaScript
Raw Normal View History

2014-08-04 14:38:56 +08:00
it("should ignore require.config", function() {
require.config({
2014-08-04 14:38:56 +08:00
});
requirejs.config({
2014-08-04 14:38:56 +08:00
});
});
it("should have a require.version", function() {
require.version.should.be.type("string");
});
it("should have a requirejs.onError function", function() {
function f(){}
requirejs.onError.should.be.type("function"); // has default handler
var org = requirejs.onError;
requirejs.onError = f;
requirejs.onError.should.be.eql(f);
requirejs.onError = org;
require(["./file.js"], function() {});
});