Bun Finding Tests
Learn how Bun's test runner discovers and filters test files in your project
Install
npx skills add jarle/bun-skills --skill Bun Finding testsgit 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-discovery ~/.claude/skills/Bun-Finding-testsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Finding tests
> Learn how Bun's test runner discovers and filters test files in your project
bun test's file discovery mechanism determines which files to run as tests. Understanding how it works helps you structure your test files effectively.
## Default Discovery Logic
By default, `bun test` recursively searches the project directory for files that match specific patterns:
* `*.test.{js|jsx|ts|tsx}` - Files ending with `.test.js`, `.test.jsx`, `.test.ts`, or `.test.tsx`
* `*_test.{js|jsx|ts|tsx}` - Files ending with `_test.js`, `_test.jsx`, `_test.ts`, or `_test.tsx`
* `*.spec.{js|jsx|ts|tsx}` - Files ending with `.spec.js`, `.spec.jsx`, `.spec.ts`, or `.spec.tsx`
* `*_spec.{js|jsx|ts|tsx}` - Files ending with `_spec.js`, `_spec.jsx`, `_spec.ts`, or `_spec.tsx`
## Exclusions
By default, Bun test ignores:
* `node_modules` directories
* Hidden directories (those starting with a period `.`)
* Files that don't have JavaScript-like extensions (based on available loaders)
## Customizing Test Discovery
### Position Arguments as Filters
You can filter which test files run by passing additional positional arguments to `bun test`:
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun test <filter> <filter> ...
```
Any test file with a path that contains one of the filters will run. These filters are simple substring matches, not glob patterns.
For example, to run all tests in a `utils` directory:Details
- Skill name
Bun Finding tests- Repository
- jarle/bun-skills
- Path
skills/bun-test-discovery/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun Finding Tests skill do?
Learn how Bun's test runner discovers and filters test files in your project
How do I install the Bun Finding Tests skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Finding tests. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun Finding Tests 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 Generate Code Coverage Reports with the Bun Test Runner
9jarle/bun-skills
Generate code coverage reports with the Bun test runner
Bun DOM Testing
9jarle/bun-skills
Learn how to test DOM elements and components using Bun with happy-dom and React Testing Library
Bun Import, Require, and Test Svelte Components with Bun Test
9jarle/bun-skills
import, require, and test Svelte components with bun test
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.