Skip to content

Commit 6368dd0

Browse files
committed
fix browsertests
1 parent 5ec15f8 commit 6368dd0

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

test/browsertest/lib/index.web.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
// Should not break it...
2-
if(typeof require !== "function")
3-
var require = require("amdrequire");
4-
if(typeof define != "function")
5-
var define = require("amdefine");
6-
71
function test(cond, message) {
82
if(!cond) throw new Error(message);
93
}

test/cases/parsing/harmony-commonjs-mix/module1.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ import "./module";
1313

1414
export default 1234;
1515

16-
// exports is node.js exports and not webpacks
17-
Object.keys(exports).should.be.eql([]);
16+
if(eval("typeof exports !== \"undefined\"")) {
17+
// exports is node.js exports and not webpacks
18+
Object.keys(exports).should.be.eql([]);
19+
}

test/cases/parsing/issue-3917/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ it("should be able to compile a module with UMD", function() {
55

66
it("should not find a free exports", function() {
77
var x = require("./module2");
8-
(x.default).should.be.equal(exports);
8+
if(typeof exports !== "undefined")
9+
(x.default).should.be.equal(exports);
10+
else
11+
(x.default).should.be.eql(false);
912
});
1013

1114
export {}

0 commit comments

Comments
 (0)