diff options
author | 2023-08-03 18:23:57 -0700 | |
---|---|---|
committer | 2023-08-03 18:23:57 -0700 | |
commit | 717f0a2f423fce1245b59f33e1dab1f5e6c86734 (patch) | |
tree | 97a968a7f6c5a2091a6bd3b4e52f262f486d7b55 /test/js/node/module/node-module-module.test.js | |
parent | c2ebdf812b4d23a89367de2e238c5a534f693e95 (diff) | |
download | bun-717f0a2f423fce1245b59f33e1dab1f5e6c86734.tar.gz bun-717f0a2f423fce1245b59f33e1dab1f5e6c86734.tar.zst bun-717f0a2f423fce1245b59f33e1dab1f5e6c86734.zip |
Make the test better
Diffstat (limited to 'test/js/node/module/node-module-module.test.js')
-rw-r--r-- | test/js/node/module/node-module-module.test.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/js/node/module/node-module-module.test.js b/test/js/node/module/node-module-module.test.js index c988cd8c7..f91f8048e 100644 --- a/test/js/node/module/node-module-module.test.js +++ b/test/js/node/module/node-module-module.test.js @@ -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});"); }); |