diff options
author | 2023-09-22 01:09:55 -0400 | |
---|---|---|
committer | 2023-09-21 22:09:55 -0700 | |
commit | 25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a (patch) | |
tree | adf1d5e53f27a2f4ca7b2074fbd54e2c67764a74 /test/cli/run/require-cache-fixture-b.cjs | |
parent | 9d5459221ff663b6c0058440167e098886d97cc2 (diff) | |
download | bun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.tar.gz bun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.tar.zst bun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.zip |
Implement module.parent (#5889)bun-v1.0.3
* Make module.parent work
* yay
* oops
* yay
Diffstat (limited to 'test/cli/run/require-cache-fixture-b.cjs')
-rw-r--r-- | test/cli/run/require-cache-fixture-b.cjs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/cli/run/require-cache-fixture-b.cjs b/test/cli/run/require-cache-fixture-b.cjs index c3f2c8a26..525d5b3db 100644 --- a/test/cli/run/require-cache-fixture-b.cjs +++ b/test/cli/run/require-cache-fixture-b.cjs @@ -6,3 +6,10 @@ if (require.main === module) { console.error(__filename, module.id); throw new Error("require.main === module"); } + +if (module.parent == null || typeof module.parent !== "object") { + console.error(module.parent); + throw new Error("module.parent == null"); +} + +module.exports = { x: module.parent }; |