npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bun-ui-tests

v1.1.2

Published

A beautiful UI for running Bun tests

Readme

Bun UI Test

npm version License Bun

A professional, real-time web interface for the Bun test runner.

Bun UI Test provides a streamlined dashboard to visualize test execution, debug failures with structured logging, and manage large test suites through an interactive WebSocket-based UI. It is designed to enhance the developer experience by offering granular control over test execution without leaving the browser.

Table of Contents

Features

  • Real-Time WebSocket Feedback: Test results and logs are streamed instantly from the Bun runtime to the browser.
  • Granular Execution Control: Run the entire suite, specific test files, or individual test cases with a single click.
  • Smart Error Formatting: Automatically parses stack traces and assertion errors, grouping them into readable blocks.
  • Responsive Design: Adaptive interface that works effectively on both desktop and mobile viewports.
  • Zero Configuration: Automatically detects standard test file patterns (.test.ts, .spec.js, etc.) without requiring a config file.
  • Unified Server: Runs the static frontend and WebSocket server on a single port (5050) for simplified networking.

Prerequisites

  • Bun Runtime: v1.0.0 or higher.
  • Node.js: Not required (this tool is Bun-native).

Installation

Global Installation (Recommended)

Install the package globally to use it across all your projects.

# Using npm
npm install -g bun-ui-tests

# Using Bun
bun add -g bun-ui-tests

Temporary Execution (bunx)

If you prefer not to install the package globally, you can run it on-demand:

bunx bun-ui-tests run

Usage

Navigate to the root of your project (where your package.json is located) and execute the runner.

Start the Dashboard

bun-ui-tests run

The interface will be accessible at http://localhost:5050.

Development Mode

If you are contributing to the bun-ui-tests codebase itself, use the development mode to enable hot-reloading for the React frontend:

bun-ui-tests dev

Interface Overview

The dashboard is divided into two primary panels:

1. Test Explorer (Left Panel)

Displays a hierarchical view of all detected test files.

  • File Status Indicators: Visual cues for passed (Green), failed (Red), or running (Yellow) states.
  • Expand/Collapse: Group tests by file to reduce noise.
  • Individual Triggers: Click the "Play" icon next to any file or specific test case to run only that scope.

2. Execution Log (Right Panel)

A live console output window.

  • Structured Logging: Standard stdout/stderr streams are captured.
  • Error Blocks: Stack traces and failure details are highlighted in red blocks for immediate visibility.
  • Auto-Scroll: The view automatically follows the latest output during execution.

Architecture

This tool uses a decoupled architecture to ensure stability and performance:

  1. CLI Entry Point: The bun-ui-tests command starts a Bun-native HTTP server.
  2. Process Management: When a test run is triggered, the server spawns a child process executing the native bun test command.
  3. Stream Parsing: The stdout and stderr streams from the child process are intercepted and parsed in real-time to identify test lifecycle events (start, pass, fail).
  4. WebSocket Broadcast: Parsed events are serialized and sent to the React frontend via WebSocket.

This approach ensures that bun-ui-tests remains compatible with all standard Bun testing features, as it acts as a wrapper around the native runner rather than replacing it.

Troubleshooting

Port Conflicts

The application attempts to bind to port 5050. If this port is in use, the application will fail to start. Ensure port 5050 is free before running the tool.

# Check port usage on Linux/macOS
lsof -i :5050

No Tests Found

If the dashboard shows "No test files found", ensure:

  1. You are running the command from the project root.
  2. Your test files match standard patterns (e.g., *.test.ts, *.spec.js).
  3. Your test files are not inside node_modules or dist folders.

Contributing

Contributions are welcome. Please follow these steps to set up your local development environment:

  1. Clone the repository:
    git clone https://github.com/KillDarkness/Bun-UI-Test.git
  2. Install dependencies:
    bun install
    cd app && bun install
  3. Start the development server:
    bun run dev

Links

License

This project is licensed under the MIT License.