Skip to content

Commit 9a8095e

Browse files
committed
Add more of the node semantics
1 parent 923068b commit 9a8095e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@ define("local-module-non-object", ["local-side-effect"], function (sideEffect) {
1818
it("should create dependency when require is called with 'new' (object export)", function() {
1919
const result = new require("./object-export");
2020
result.foo.should.equal("bar");
21+
result.should.equal(require("./object-export"));
2122
});
2223

2324
it("should create dependency when require is called with 'new' (non-object export)", function() {
2425
const sideEffect = require("./sideEffect");
2526
const result = new require("./non-object-export");
2627
result.should.instanceof(__webpack_require__);
2728
sideEffect.foo.should.equal("bar");
29+
result.should.not.equal(require("./non-object-export"));
2830
});
2931

3032
it("should create dependency with 'new' on a local dependency (object export)", function() {
3133
const result = new require("local-module-object");
3234
result.foo.should.equal("bar");
35+
result.should.equal(require("local-module-object"));
3336
});
3437

3538
it("shouldn't fail with a local dependency (non-object export)", function() {

0 commit comments

Comments
 (0)