diff --git a/test/browsertest/lib/index.web.js b/test/browsertest/lib/index.web.js index a504ceac4..4f76137bf 100644 --- a/test/browsertest/lib/index.web.js +++ b/test/browsertest/lib/index.web.js @@ -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); } diff --git a/test/cases/parsing/harmony-commonjs-mix/module1.js b/test/cases/parsing/harmony-commonjs-mix/module1.js index a3041edbe..ab456ad0a 100644 --- a/test/cases/parsing/harmony-commonjs-mix/module1.js +++ b/test/cases/parsing/harmony-commonjs-mix/module1.js @@ -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([]); +} diff --git a/test/cases/parsing/issue-3917/index.js b/test/cases/parsing/issue-3917/index.js index 5cb09b22d..119e28bed 100644 --- a/test/cases/parsing/issue-3917/index.js +++ b/test/cases/parsing/issue-3917/index.js @@ -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 {}