testing — agent-collaboration testing, lobehub, community, agent-collaboration, ide skills, agent-harness, chatgpt, deepseek, gemini, knowledge-base, Claude Code

v1.0.0

Об этом навыке

Идеально для агентов разработчиков, которым необходимы эффективные фреймворки для тестирования с vitest. Testing guide using Vitest. Use when writing tests (.test.ts, .test.tsx), fixing failing tests, improving test coverage, or debugging test issues. Triggers on test creation, test debugging, mock setup, or test-related questions.

# Core Topics

lobehub lobehub
[73.3k]
[14750]
Updated: 3/9/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 7/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
7/11
Quality Score
49
Canonical Locale
en
Detected Body Locale
en

Идеально для агентов разработчиков, которым необходимы эффективные фреймворки для тестирования с vitest. Testing guide using Vitest. Use when writing tests (.test.ts, .test.tsx), fixing failing tests, improving test coverage, or debugging test issues. Triggers on test creation, test debugging, mock setup, or test-related questions.

Зачем использовать этот навык

Позволяет агентам запускать конкретные файлы тестов беззвучно с помощью vitest, и сотрудничать с членами команды над комплексными фреймворками для тестирования, используя команды типа 'bunx vitest run' и обрабатывая пакеты базы данных с помощью переменных окружения TEST_SERVER_DB.

Подходит лучше всего

Идеально для агентов разработчиков, которым необходимы эффективные фреймворки для тестирования с vitest.

Реализуемые кейсы использования for testing

Запуск конкретных файлов тестов с vitest
Тестирование пакетов базы данных на сторонах клиента и сервера
Сотрудничество с членами команды над комплексными фреймворками для тестирования

! Безопасность и ограничения

  • Требуется установка vitest
  • Необходимо окружение времени выполнения Bun
  • Избегать запуска 'bun run test' из-за обширной коллекции тестов

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is testing?

Идеально для агентов разработчиков, которым необходимы эффективные фреймворки для тестирования с vitest. Testing guide using Vitest. Use when writing tests (.test.ts, .test.tsx), fixing failing tests, improving test coverage, or debugging test issues. Triggers on test creation, test debugging, mock setup, or test-related questions.

How do I install testing?

Run the command: npx killer-skills add lobehub/lobehub/testing. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for testing?

Key use cases include: Запуск конкретных файлов тестов с vitest, Тестирование пакетов базы данных на сторонах клиента и сервера, Сотрудничество с членами команды над комплексными фреймворками для тестирования.

Which IDEs are compatible with testing?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for testing?

Требуется установка vitest. Необходимо окружение времени выполнения Bun. Избегать запуска 'bun run test' из-за обширной коллекции тестов.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add lobehub/lobehub/testing. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use testing immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Imported Repository Instructions

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Supporting Evidence

testing

Install testing, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly
Imported Repository Instructions
The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.
Supporting Evidence

LobeHub Testing Guide

Quick Reference

Commands:

bash
1# Run specific test file 2bunx vitest run --silent='passed-only' '[file-path]' 3 4# Database package (client) 5cd packages/database && bunx vitest run --silent='passed-only' '[file]' 6 7# Database package (server) 8cd packages/database && TEST_SERVER_DB=1 bunx vitest run --silent='passed-only' '[file]'

Never run bun run test - it runs all 3000+ tests (~10 minutes).

Test Categories

CategoryLocationConfig
Webappsrc/**/*.test.ts(x)vitest.config.ts
Packagespackages/*/**/*.test.tspackages/*/vitest.config.ts
Desktopapps/desktop/**/*.test.tsapps/desktop/vitest.config.ts

Core Principles

  1. Prefer vi.spyOn over vi.mock - More targeted, easier to maintain
  2. Tests must pass type check - Run bun run type-check after writing tests
  3. After 1-2 failed fix attempts, stop and ask for help
  4. Test behavior, not implementation details

Basic Test Structure

typescript
1import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; 2 3beforeEach(() => { 4 vi.clearAllMocks(); 5}); 6 7afterEach(() => { 8 vi.restoreAllMocks(); 9}); 10 11describe('ModuleName', () => { 12 describe('functionName', () => { 13 it('should handle normal case', () => { 14 // Arrange → Act → Assert 15 }); 16 }); 17});

Mock Patterns

typescript
1// ✅ Spy on direct dependencies 2vi.spyOn(messageService, 'createMessage').mockResolvedValue('id'); 3 4// ✅ Use vi.stubGlobal for browser APIs 5vi.stubGlobal('Image', mockImage); 6vi.spyOn(URL, 'createObjectURL').mockReturnValue('blob:mock'); 7 8// ❌ Avoid mocking entire modules globally 9vi.mock('@/services/chat'); // Too broad

Detailed Guides

See references/ for specific testing scenarios:

  • Database Model testing: references/db-model-test.md
  • Electron IPC testing: references/electron-ipc-test.md
  • Zustand Store Action testing: references/zustand-store-action-test.md
  • Agent Runtime E2E testing: references/agent-runtime-e2e.md
  • Desktop Controller testing: references/desktop-controller-test.md

Common Issues

  1. Module pollution: Use vi.resetModules() when tests fail mysteriously
  2. Mock not working: Check setup position and use vi.clearAllMocks() in beforeEach
  3. Test data pollution: Clean database state in beforeEach/afterEach
  4. Async issues: Wrap state changes in act() for React hooks

Связанные навыки

Looking for an alternative to testing or another community skill for your workflow? Explore these related open-source skills.

Показать все

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

widget-generator

Logo of f
f

Создание настраиваемых плагинов виджетов для системы ленты новостей prompts.chat

flags

Logo of vercel
vercel

Фреймворк React

138.4k
0
Браузер

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
Разработчик