testing

Guide unit testing of code, databases, Electron IPC, and Zustand stores with Vitest.

Updated Jul 5, 2026
One-click install
npx skills add https://github.com/xkl2013/lobe --skill testing-xkl2013
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/xkl2013/lobe/tree/main/.agents/skills/testing
Command: npx skills add https://github.com/xkl2013/lobe --skill testing-xkl2013

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit provides comprehensive testing guidelines for LobeHub's applications, addressing challenges in testing code, databases, and user interactions.

Core Features & Use Cases

  • Vitest Testing Guide: Offers detailed instructions for using Vitest, including command-line operations and best practices.
  • Database Testing: Guides on testing database models and repositories with both client and server configurations.
  • Electron IPC Testing: Specifics on testing Electron IPC communication for Desktop applications.
  • Zustand Store Action Testing: Guidelines for testing the Zustand store's actions in React applications.

Quick Start

Use the 'testing' skill to run a specific test file using the command: bunx vitest run --silent='passed-only' '[file-path]'.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I run a specific test file using Vitest?

To run a specific Vitest test file, execute the command `bunx vitest run --silent='passed-only' '[file-path]'` in your terminal. This command runs the targeted file and outputs only passed test results.

Can I test Electron IPC communication with Vitest?

Yes, you can test Electron IPC communication with Vitest. The testing guidelines provide specific instructions for validating IPC interactions within Desktop applications to ensure stable cross-process messaging.

What is the best way to test Zustand store actions?

The best way to test Zustand store actions is by following the specific Vitest guidelines provided for React applications. This approach validates state management logic and ensures store actions behave as expected.

How do I test database models and repositories with Vitest?

To test database models and repositories with Vitest, you need to configure both client and server test environments. The guidelines offer detailed setup instructions to validate your database layer effectively.

Does database testing with Vitest require special environment setup?

Yes, database testing with Vitest requires setting up specific test environments. The guidelines include instructions for configuring both client-side and server-side environments to ensure accurate database model and repository validation.