mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
Merge branch 'main' into claude/fix-v8-i18n-support-typo
This commit is contained in:
1
test/js/node/process/process-mainModule-fixture.esm.mjs
generated
Normal file
1
test/js/node/process/process-mainModule-fixture.esm.mjs
generated
Normal file
@@ -0,0 +1 @@
|
||||
process.mainModule = 123;
|
||||
19
test/js/node/process/process-mainModule-fixture.js
generated
Normal file
19
test/js/node/process/process-mainModule-fixture.js
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
process.mainModule = process.mainModule;
|
||||
|
||||
module.exports = {};
|
||||
|
||||
if (module.exports !== process.mainModule.exports) {
|
||||
throw new Error("module.exports !== process.mainModule");
|
||||
}
|
||||
|
||||
if (require.main !== process.mainModule) {
|
||||
throw new Error("require.main !== process.mainModule");
|
||||
}
|
||||
|
||||
process.mainModule = { abc: 123 };
|
||||
|
||||
if (require.main === process.mainModule) {
|
||||
throw new Error("require.main === process.mainModule");
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user