Skip to content

Commit

Permalink
Make the test better
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Aug 4, 2023
1 parent c2ebdf8 commit 717f0a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/js/node/module/node-module-module.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ test("_nodeModulePaths() works", () => {

test("Module.wrap", () => {
var mod = { exports: {} };
expect(eval(wrap("exports.foo = 1; return 42"))(mod, mod.exports)).toBe(42);
expect(eval(wrap("exports.foo = 1; return 42"))(mod.exports, mod)).toBe(42);
expect(mod.exports.foo).toBe(1);
expect(wrap()).toBe("(function (exports, require, module, __filename, __dirname) { undefined\n});");
});

0 comments on commit 717f0a2

Please sign in to comment.