diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/cli/run/env.test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/cli/run/env.test.ts b/test/cli/run/env.test.ts index 3ed300477..1c2d51e8e 100644 --- a/test/cli/run/env.test.ts +++ b/test/cli/run/env.test.ts @@ -385,6 +385,16 @@ test(".env with zero length strings", () => { expect(stdout).toBe("||0|0"); }); +test("process with zero length environment variable", () => { + const dir = tempDirWithFiles("process-issue-zerolength", { + "index.ts": "console.log(`'${process.env.TEST_ENV_VAR}'`);", + }); + const { stdout } = bunRun(`${dir}/index.ts`, { + TEST_ENV_VAR: "", + }); + expect(stdout).toBe("''"); +}); + test(".env in a folder doesn't throw an error", () => { const dir = tempDirWithFiles("dotenv-issue-3670", { ".env": { |