diff options
author | 2022-11-14 17:52:52 -0800 | |
---|---|---|
committer | 2022-11-14 17:53:15 -0800 | |
commit | 436b8e14611e346fdb2c581a7c137f1dde10f1b0 (patch) | |
tree | 2c06462ecaf469894aad5c34b1440cf07707e9cb /test/bun.js/process.test.js | |
parent | 272e71fec2117bc759b2a41e0eaf985f9b064e51 (diff) | |
download | bun-436b8e14611e346fdb2c581a7c137f1dde10f1b0.tar.gz bun-436b8e14611e346fdb2c581a7c137f1dde10f1b0.tar.zst bun-436b8e14611e346fdb2c581a7c137f1dde10f1b0.zip |
Fix crashiness with `process.env`
This also makes it a lot slower
Diffstat (limited to 'test/bun.js/process.test.js')
-rw-r--r-- | test/bun.js/process.test.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/bun.js/process.test.js b/test/bun.js/process.test.js index 296e786cf..e221375d1 100644 --- a/test/bun.js/process.test.js +++ b/test/bun.js/process.test.js @@ -75,3 +75,15 @@ it("process.release", () => { }-${{ arm64: "aarch64", x64: "x64" }[process.arch] || process.arch}.zip`, ); }); + +it("process.env", () => { + process.env["LOL SMILE UTF16 😂"] = "😂"; + expect(process.env["LOL SMILE UTF16 😂"]).toBe("😂"); + delete process.env["LOL SMILE UTF16 😂"]; + expect(process.env["LOL SMILE UTF16 😂"]).toBe(undefined); + + process.env["LOL SMILE latin1 <abc>"] = "<abc>"; + expect(process.env["LOL SMILE latin1 <abc>"]).toBe("<abc>"); + delete process.env["LOL SMILE latin1 <abc>"]; + expect(process.env["LOL SMILE latin1 <abc>"]).toBe(undefined); +}); |