diff options
author | 2023-07-19 23:04:07 -0700 | |
---|---|---|
committer | 2023-07-19 23:04:07 -0700 | |
commit | 8a13e024734f1571e294a72f5a0ab2835eac4b8f (patch) | |
tree | 9184a9f0321166c8746d693f49d0bcefa8fdfcee /test/cli/run/env.test.ts | |
parent | ed8be46a7bf00321b4a10571e245e8fd744676d9 (diff) | |
download | bun-8a13e024734f1571e294a72f5a0ab2835eac4b8f.tar.gz bun-8a13e024734f1571e294a72f5a0ab2835eac4b8f.tar.zst bun-8a13e024734f1571e294a72f5a0ab2835eac4b8f.zip |
Fixes #3670 (#3698)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'test/cli/run/env.test.ts')
-rw-r--r-- | test/cli/run/env.test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/cli/run/env.test.ts b/test/cli/run/env.test.ts index e6ee99dd2..8ae824607 100644 --- a/test/cli/run/env.test.ts +++ b/test/cli/run/env.test.ts @@ -318,3 +318,15 @@ test(".env with zero length strings", () => { const { stdout } = bunRun(`${dir}/index.ts`); expect(stdout).toBe("||0|0"); }); + +test(".env in a folder doesn't throw an error", () => { + const dir = tempDirWithFiles("dotenv-issue-3670", { + ".env": { + ".env.local": "FOO=''\n", + }, + "index.ts": "console.write('hey')", + "package.json": '{ "name": ' + '"test"' + " }", + }); + const { stdout } = bunRun(`${dir}/index.ts`); + expect(stdout).toBe("hey"); +}); |