aboutsummaryrefslogtreecommitdiff
path: root/test/cli/run/env.test.ts
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-07-19 23:04:07 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-19 23:04:07 -0700
commit8a13e024734f1571e294a72f5a0ab2835eac4b8f (patch)
tree9184a9f0321166c8746d693f49d0bcefa8fdfcee /test/cli/run/env.test.ts
parented8be46a7bf00321b4a10571e245e8fd744676d9 (diff)
downloadbun-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.ts12
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");
+});