We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
bun test
.env.local
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.2.13-canary.23+500199fe8
Darwin 24.4.0 arm64 arm
Create these files
// foo.test.ts it("works", () => { expect(process.env.FOO).toBe("foo") });
# .env.local FOO=foo
Then run bun test
Test passes
bun test v1.2.13-canary.23 (500199fe) index.test.ts: 1 | it("works", () => { 2 | expect(process.env.FOO).toBe("foo") ^ error: expect(received).toBe(expected) Expected: "foo" Received: undefined
.env files are loaded correctly
.env
The text was updated successfully, but these errors were encountered:
use .env.local for tests (oven-sh#19542)
e992ff6
Successfully merging a pull request may close this issue.
What version of Bun is running?
1.2.13-canary.23+500199fe8
What platform is your computer?
Darwin 24.4.0 arm64 arm
What steps can reproduce the bug?
Create these files
Then run
bun test
What is the expected behavior?
Test passes
What do you see instead?
Additional information
.env
files are loaded correctlyThe text was updated successfully, but these errors were encountered: