mirror of https://github.com/webpack/webpack.git
fix browsertests
This commit is contained in:
parent
5ec15f812c
commit
6368dd0368
|
|
@ -1,9 +1,3 @@
|
|||
// Should not break it...
|
||||
if(typeof require !== "function")
|
||||
var require = require("amdrequire");
|
||||
if(typeof define != "function")
|
||||
var define = require("amdefine");
|
||||
|
||||
function test(cond, message) {
|
||||
if(!cond) throw new Error(message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,5 +13,7 @@ import "./module";
|
|||
|
||||
export default 1234;
|
||||
|
||||
// exports is node.js exports and not webpacks
|
||||
Object.keys(exports).should.be.eql([]);
|
||||
if(eval("typeof exports !== \"undefined\"")) {
|
||||
// exports is node.js exports and not webpacks
|
||||
Object.keys(exports).should.be.eql([]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ it("should be able to compile a module with UMD", function() {
|
|||
|
||||
it("should not find a free exports", function() {
|
||||
var x = require("./module2");
|
||||
(x.default).should.be.equal(exports);
|
||||
if(typeof exports !== "undefined")
|
||||
(x.default).should.be.equal(exports);
|
||||
else
|
||||
(x.default).should.be.eql(false);
|
||||
});
|
||||
|
||||
export {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue