Skip to content

Commit

Permalink
fix browsertests
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed May 25, 2017
1 parent 5ec15f8 commit 6368dd0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 0 additions & 6 deletions test/browsertest/lib/index.web.js
Original file line number Diff line number Diff line change
@@ -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);
}
Expand Down
6 changes: 4 additions & 2 deletions test/cases/parsing/harmony-commonjs-mix/module1.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 4 additions & 1 deletion test/cases/parsing/issue-3917/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

0 comments on commit 6368dd0

Please sign in to comment.