https://github.com/rettend/bun-test-ui
Test runner UI for Bun, similar to Vitest UI
https://github.com/rettend/bun-test-ui
bun bun-test test-ui
Last synced: 4 months ago
JSON representation
Test runner UI for Bun, similar to Vitest UI
- Host: GitHub
- URL: https://github.com/rettend/bun-test-ui
- Owner: Rettend
- License: mit
- Created: 2025-12-06T15:22:36.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-08T17:38:26.000Z (6 months ago)
- Last Synced: 2026-01-21T19:33:17.179Z (5 months ago)
- Topics: bun, bun-test, test-ui
- Language: TypeScript
- Homepage:
- Size: 767 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bun-test-ui
A visual test runner UI for Bun, similar to [Vitest UI](https://vitest.dev/guide/ui.html).
[](https://npmx.dev/package/bun-test-ui)

## Install
```bash
bun add -d bun-test-ui
```
## Usage
```bash
bunx bun-test-ui
```
This starts the UI at `http://localhost:51205` and auto-opens your system browser.
### Options
```bash
bunx bun-test-ui [pattern] [options]
Options:
-p, --port Port to run on (default: 51205)
--no-watch Disable watch mode
--no-open Don't auto-open browser
```
## Config
The CLI reads your `bunfig.toml` for test configuration:
```toml
[test]
root = "./tests/real"
```
For this repository:
- `tests/demo` contains UI demo tests (including intentional failures)
- `tests/real` contains the actual project test suite
Watch mode watches the current directory:
- **Test file changes** → Only that test file is re-run
- **Source file changes** → All tests are re-run
## How it works
Uses [bun-inspector-protocol](https://github.com/oven-sh/bun/blob/main/packages/bun-inspector-protocol/README.md) to communicate with Bun's test runner via the WebSocket inspector, similar to how `bun-vscode` implements VS Code test runner support.
## Development
```bash
bun install
# Dev server with HMR
bun run dev
# Dev server against real tests
bun run dev:real
# Run real tests (default)
bun test
# Run demo tests (includes intentional failures)
bun run test:demo
# Build for prod
bun run build
# Run prod CLI
bun run start
```
## License
MIT