aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/module/node-module-module.test.js
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-08-08 19:37:36 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-08 19:37:36 -0700
commit1941dbbd71c6d6730ca78b21ef2fd20f51124950 (patch)
tree3ac2c26307fcdd2beafff8131218c7c8861e9eda /test/js/node/module/node-module-module.test.js
parent320cdcf97e549c45ab50bbbc3c415dc011260f20 (diff)
downloadbun-1941dbbd71c6d6730ca78b21ef2fd20f51124950.tar.gz
bun-1941dbbd71c6d6730ca78b21ef2fd20f51124950.tar.zst
bun-1941dbbd71c6d6730ca78b21ef2fd20f51124950.zip
Set exports to {} in user-constructed CommonJSModuleRecords (#4076)
Diffstat (limited to 'test/js/node/module/node-module-module.test.js')
-rw-r--r--test/js/node/module/node-module-module.test.js5
1 files changed, 4 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 58a81fb98..08955a7b7 100644
--- a/test/js/node/module/node-module-module.test.js
+++ b/test/js/node/module/node-module-module.test.js
@@ -26,8 +26,11 @@ test("Module exists", () => {
expect(Module).toBeDefined();
});
-test("module.Module exists", () => {
+test("module.Module works", () => {
expect(Module.Module === Module).toBeTrue();
+
+ const m = new Module("asdf");
+ expect(m.exports).toEqual({});
});
test("_nodeModulePaths() works", () => {