$npx skillfedfor your agent

testing-strategy

Testing Strategy provides comprehensive testing patterns for Tauri applications spanning Rust backend and React frontend. It covers unit and integration tests, test fixtures, command mocking, and test coverage strategies to support quality assurance and TDD workflows.

Testing Strategy helps you write and structure unit tests for Rust backend and React frontend code.

AI-generated summary based on this skill's SKILL.md

4 3 MITupdated by cacr92

Decision gist · record as of 2026-01-30

Testing Strategy helps you write and structure unit tests for Rust backend and React frontend code. Testing Strategy provides comprehensive testing patterns for Tauri applications spanning Rust backend and React frontend. It covers unit and integration tests, test fixtures, command mocking, and test coverage strategies to support quality assurance and TDD workflows.

manual: git clone https://github.com/cacr92/WeReply → cp -r WeReply/.claude/skills/testing-strategy ~/.claude/skills/testing-strategy
.claude/skills/testing-strategy/SKILL.md · version 7f3e6c5b

Use it when

  • Testing Strategy guides you through React component testing by rendering components with a testing library.
  • Testing Strategy advises creating reusable test fixtures that populate your database with consistent test data before each test run.

Verify before relying

Read SKILL.md below before installing (2 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

cacr92/WeReply/testing-strategy · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I write Rust unit tests for backend code?

Testing Strategy recommends structuring Rust unit tests within your backend modules using `#[cfg(test)]` modules and the `#[test]` attribute. For async code, use `#[tokio::test]` to run tests with the Tokio runtime. Keep tests focused on single behaviors, use descriptive names, and leverage assertions like `assert_eq!` and `assert!`. Testing Strategy emphasizes organizing tests close to the code they verify for maintainability.

What's the best approach for react component testing with vitest?

Testing Strategy guides you through React component testing by rendering components with a testing library, then querying and asserting on DOM elements. Use vitest as your test runner for fast feedback. Mock external dependencies and API calls to isolate component logic. For hooks, Testing Strategy recommends using `renderHook` to test custom logic independently, and pair it with `waitFor` for async state updates.

How should I set up test fixtures and database seeding for integration tests?

Testing Strategy advises creating reusable test fixtures that populate your database with consistent test data before each test run. For SQLite, use in-memory databases to avoid file I/O overhead. Define fixture factories that generate realistic data shapes, then seed them in setup hooks. Testing Strategy emphasizes isolating test data so tests remain independent and can run in any order without side effects.

How do I implement TDD workflow and improve test coverage?

Testing Strategy supports the red-green-refactor cycle: write a failing test first, implement minimal code to pass it, then refactor. Track coverage with tools like tarpaulin for Rust and vitest's coverage reports for TypeScript. Testing Strategy recommends setting coverage goals (e.g., 80%) and focusing on critical paths rather than chasing 100%. Regularly review uncovered branches to identify gaps.

What's the tauri command mocking setup for testing?

Testing Strategy explains that Tauri commands can be mocked by stubbing the invoke function in your test environment. Create mock implementations that return predictable responses, allowing you to test frontend logic without running the backend. Testing Strategy suggests using vitest's `vi.mock()` to intercept command calls and inject test data, enabling isolated component testing.

How do I test my API calls and external dependencies?

Testing Strategy recommends mocking external dependencies using your test framework's mocking utilities. For API calls, intercept HTTP requests with libraries like MSW (Mock Service Worker) or stub fetch/axios directly. Testing Strategy emphasizes testing both success and error paths, validating request payloads, and ensuring your code handles timeouts and network failures gracefully.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Testing Strategy Skill

Comprehensive testing guidance for Tauri applications with Rust backend and React frontend.

Overview

This skill provides testing strategies for: - Rust unit and integration tests - React component and hook tests - Tauri command mocking - Database testing with fixtures - Test coverage and quality gates - TDD (Test-Driven Development) workflows

When This Skill Applies

This skill activates when: - Writing new tests for Rust or TypeScript code - Implementing test doubles and mocks - Setting up test infrastructure - Debugging test failures - Improving test coverage - Planning testing strategy for features

Rust Testing

Unit Tests

Location: In the same module as the code being tested

```rust

[cfg(test)]

mod tests { use super::*;

#[test]
fn test_formula_cost_calculation() {
    let materials = vec![
        FormulaMaterial {
            material_code: "corn".to_string(),

(truncated - see the full file via the links below)

File tree — 2 files
.claude/skills/testing-strategy/SKILL.md
.claude/skills/testing-strategy/skill.json

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Write and structure unit tests for Rust backend code”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

react-typescript-development
by cacr92 · cacr92/WeReply

Master React 19 and TypeScript 5 component development with production-ready patterns for Ant Design, TanStack Query state management, and Tauri desktop apps. Learn Hooks best practices, form validation, performance optimization with React.memo and useCallback, and type-safe command integration without sacrificing developer experience.

MITfor claude-code, codex, cursorupdated Jan 2026
★ 4repo stars
bug-fix-tdd
by stacklok · stacklok/toolhive-studio

Bug Fix TDD guides you through test-driven bug resolution: write a failing test that reproduces the issue, then apply the minimum fix to make it pass. The skill covers test placement, mock patterns, and the complete red-green-refactor cycle for both standard fixes and fallback code-analysis approaches when reproduction isn't possible.

Apache-2.0for claude-code, codex, cursorupdated Jul 2026
★ 158repo stars
tdd
by zereight · zereight/gitlab-mcp

tdd guides you through strict test-driven development using the red-green-refactor cycle: write a failing test, implement minimal code to pass it, then refactor. The skill enforces the discipline of writing tests before production code and provides framework-specific commands for multiple languages.

MITupdated Jul 2026
★ 1,847repo stars
Tdd Workflow
by cacr92 · cacr92/WeReply

Tdd Workflow guides developers through test-first development using the red-green-refactor pattern: write failing tests, implement minimal code to pass, then refactor while maintaining test coverage. It covers unit and integration testing strategies for both Rust and TypeScript, with practical examples including validation logic, mocking external dependencies, and coverage verification tools. All new features and fixes must meet an 80% test coverage threshold.

MITfor claude-code, codex, cursordocs in Chineseupdated Jan 2026
★ 4repo stars
React Testing Patterns
by hieutrtr · hieutrtr/ai1-skills

Master Testing Library and Vitest patterns for React components, custom hooks, and async workflows. This skill covers behavior-driven testing with userEvent, MSW for API mocking, renderHook for custom logic, and jest-axe for accessibility audits—everything except E2E tests and TDD enforcement.

no license declared → metadata onlyupdated Feb 2026
★ 8repo stars
tanstack-query
by bobmatnyc · bobmatnyc/claude-mpm-skills

TanStack Query handles server-state fetching and caching in React applications, automating data synchronization and eliminating manual boilerplate. It provides built-in background refetching, optimistic mutations, intelligent cache invalidation, and pagination support for complex data workflows.

MITupdated Jul 2026
★ 62repo stars

More skills refactoring (MIT) · react-testing (MIT) · rtk-tdd (Apache-2.0) · error-handling-debugging (MIT) · deepseek-integration (MIT) · Error Handler (NOASSERTION) · ipc-communication (MIT) · tauri-development (MIT)

Tags
backend-testingfrontend-testingquality-assurancetest-infrastructuremock-doublescoverage-metricsasync-testingend-to-end-workflowstest-data-setupvalidation-testing