aboutsummaryrefslogtreecommitdiff
path: root/test/cli/run/env.test.ts
diff options
context:
space:
mode:
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");
+});