typescript-testing

Establish TypeScript test conventions for Bun-based projects.

1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/alexgorbatchev/ai-registry --skill typescript-testing-alexgorbatchev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-testing
Source: https://github.com/alexgorbatchev/ai-registry/tree/main/skills/typescript-testing
Command: npx skills add https://github.com/alexgorbatchev/ai-registry --skill typescript-testing-alexgorbatchev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript testing guidelines and patterns help teams write, review, and maintain reliable tests for Bun-based projects, reducing flaky tests and ensuring code quality.

Core Features & Use Cases

  • Structured test organization with adjacent tests directories to keep tests close to code
  • Clear naming conventions for test files and fixtures to improve discoverability
  • Critical rules and best practices for reliable TypeScript tests across unit, integration, and snapshot scenarios
  • Guidance for fixtures, mocks, and test data management to improve test determinism

Quick Start

Create tests alongside your TypeScript sources in tests directories and run bun test to validate them.

Frequently Asked Questions about typescript-testing

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

FAQPage Schema
How do I organize TypeScript tests in a Bun project?

To organize TypeScript tests in a Bun project, place test files in adjacent __tests__ directories alongside your source code to maintain proximity and improve discoverability. Run bun test to validate them.

What are the best practices for managing mocks and fixtures in TypeScript testing?

Best practices for TypeScript testing mocks and fixtures involve using structured guidelines for test data management to improve determinism. This ensures reliable unit, integration, and end-to-end tests across your Bun-based project.

Does this approach to TypeScript testing support snapshot tests?

Yes, this TypeScript testing approach supports snapshot tests. It provides critical rules and best practices specifically designed to handle snapshot scenarios reliably alongside unit and integration tests.

Why do my TypeScript unit tests fail to maintain reliability over time?

TypeScript unit tests fail to maintain reliability when lacking strict linting, safety checks, and structured test organization. Enforcing reusable patterns and separating tests from source code ensures maintainable, non-flaky tests.

When should I use end-to-end tests versus unit tests in a Bun-based project?

Use end-to-end tests versus unit tests in a Bun-based project based on structured guidelines that separate testing scenarios. This approach enforces reusable patterns across unit, integration, and end-to-end tests to ensure reliable coverage.