Bun Runtime Behavior
Learn about Bun test's runtime integration, environment variables, timeouts, and error handling
Install
npx skills add jarle/bun-skills --skill Bun Runtime behaviorgit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-test-runtime-behavior ~/.claude/skills/Bun-Runtime-behaviorPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Runtime behavior
> Learn about Bun test's runtime integration, environment variables, timeouts, and error handling
`bun test` is deeply integrated with Bun's runtime. This is part of what makes `bun test` fast and simple to use.
## Environment Variables
### NODE\_ENV
`bun test` automatically sets `$NODE_ENV` to `"test"` unless it's already set in the environment or via `.env` files. This is standard behavior for most test runners and helps ensure consistent test behavior.
```ts title="test.ts" icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { test, expect } from "bun:test";
test("NODE_ENV is set to test", () => {
expect(process.env.NODE_ENV).toBe("test");
});
```
You can override this by setting `NODE_ENV` explicitly:
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
NODE_ENV=development bun test
```
### TZ (Timezone)
By default, all `bun test` runs use UTC (`Etc/UTC`) as the time zone unless overridden by the `TZ` environment variable. This ensures consistent date and time behavior across different development environments.Details
- Skill name
Bun Runtime behavior- Repository
- jarle/bun-skills
- Path
skills/bun-test-runtime-behavior/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun Runtime Behavior skill do?
Learn about Bun test's runtime integration, environment variables, timeouts, and error handling
How do I install the Bun Runtime Behavior skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Runtime behavior. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun Runtime Behavior popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Bun Selectively Run Tests Concurrently with Glob Patterns
9jarle/bun-skills
Set a glob pattern to decide which tests from which files run in parallel
Bun Re Run Tests Multiple Times with the Bun Test Runner
9jarle/bun-skills
Re-run tests multiple times with the Bun test runner
Bun Set a Code Coverage Threshold with the Bun Test Runner
9jarle/bun-skills
Set a code coverage threshold with the Bun test runner
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.