test-engineer

Automate Vitest test creation and quality assurance for monorepo projects.

14|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/marcioaltoe/claude-craftkit --skill test-engineer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-engineer
Source: https://github.com/marcioaltoe/claude-craftkit/tree/main/plugins/quality/skills/test-engineer
Command: npx skills add https://github.com/marcioaltoe/claude-craftkit --skill test-engineer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers in creating comprehensive, maintainable tests for Bun applications. It covers unit, integration, and E2E testing strategies, ensuring code quality and reliability across the entire development lifecycle.

Core Features & Use Cases

  • Bun Native Testing: Leverages Bun's built-in test runner and expect() assertions for fast unit tests.
  • E2E Testing with Playwright: Implements end-to-end tests for critical user flows, ensuring full application functionality.
  • Test Strategy & Mocking: Designs effective test suites, coverage strategies, and mocking techniques for isolated testing.
  • Use Case: "Write unit tests for my Zustand store, integration tests for an API route using Hono, and E2E tests for the login flow with Playwright."

Quick Start

Write a unit test for a simple TypeScript function, including setup, execution, and assertion.

Frequently Asked Questions about test-engineer

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

FAQPage Schema
How do I write unit tests for Bun applications?

Unit tests for Bun applications leverage Bun's built-in test runner and `expect()` assertions. Write tests by importing your function, calling it with test inputs, and asserting expected outputs using the AAA pattern: arrange test data, act by invoking the function, and assert the result matches expectations.

Can I use Playwright for end-to-end testing in a Bun project?

Yes, Playwright integrates with Bun for end-to-end testing of critical user flows. Playwright automates browser interactions to test full application functionality, ensuring your Bun app works correctly from the user's perspective across login flows, navigation, and feature workflows.

What's the best way to test API routes built with Hono in Bun?

Test Hono API routes using Vitest with mocking utilities from `vi`. Write integration tests that call your route handlers, mock dependencies, and assert HTTP responses. Structure tests with AAA patterns to keep route logic isolated and fast while validating request handling and response accuracy.

How do I set up testing in a Bun monorepo?

Set up testing in a Bun monorepo using Vitest's projects mode, which allows each package to define its own test configuration. Configure Vitest with separate project entries, use Playwright for E2E tests, and apply Biome for linting and formatting across the workspace to maintain consistency.

What testing strategy should I use for Zustand stores?

Test Zustand stores with unit tests that verify state updates and selectors in isolation. Use Vitest's `vi` mocking utilities to mock store instances, test state mutations by dispatching actions, and assert final state values. Keep tests fast and focused on store logic without UI dependencies.

Why should I use mocking in my test suite?

Mocking isolates units under test by replacing external dependencies—APIs, databases, side effects—with controlled substitutes. This ensures tests run fast, remain independent of external services, and verify only the code's logic. Vitest's `vi` utilities provide mocking for functions, modules, and async operations.