unit-test

Create and execute Bun-based unit tests for TypeScript projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/gitarbor/gitarbor-tui --skill unit-test-gitarbor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-test
Source: https://github.com/gitarbor/gitarbor-tui/tree/main/.opencode/skills/unit-test
Command: npx skills add https://github.com/gitarbor/gitarbor-tui --skill unit-test-gitarbor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers quickly create and maintain unit tests for Bun-based projects, reducing manual setup work and ensuring consistent testing practices.

Core Features & Use Cases

  • Test File Creation: Generate Bun-ready test files following common naming conventions (*.test.ts, *.spec.ts) and TypeScript typings.
  • Bun Test Features & Best Practices: Demonstrate usage of describe, test, hooks, mocks, and snapshots to enforce reliable tests.
  • Use Case: When you need to validate a function's behavior, error handling, async flows, and module interactions across a codebase.

Quick Start

Ask the Skill to scaffold a Bun unit test for a given module, specify the function names to test, and choose test file naming convention.

Frequently Asked Questions about unit-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a unit test for a Bun TypeScript module?

Bun unit tests are created by generating a TypeScript test file with standard naming conventions like *.test.ts, then applying Bun test APIs and TypeScript typings to validate module behavior and async flows.

What is the best way to structure mocks and lifecycle hooks in Bun tests?

Structuring mocks and lifecycle hooks in Bun tests involves using describe blocks to group cases and hooks for setup and teardown, automating the enforcement of reliable and isolated module testing.

Does this Bun testing approach support snapshot testing for TypeScript?

Yes, snapshot testing is supported in Bun. You can generate Bun-ready test files that capture and validate serialized outputs, ensuring consistent behavior across modules without manual assertion writing.

Can I validate error handling and async flows using Bun test APIs?

Yes, you can validate error handling and async flows with Bun test APIs. The Skill automates creating tests that target these behaviors, applying TypeScript typings and testing guidelines to ensure accuracy.

What naming conventions should I use for Bun test files in a TypeScript project?

Standard naming conventions for Bun test files in a TypeScript project include appending .test.ts or .spec.ts to your module filename, enforcing consistency across your codebase during test file creation.