test-write

Write pytest, Vitest, and Playwright tests with shared fixtures and coverage checks.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/kennyolofsson23-netizen/claude-code-config --skill test-write-kennyolofsson23-netizen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-write
Source: https://github.com/kennyolofsson23-netizen/claude-code-config/tree/main/skills/test-write
Command: npx skills add https://github.com/kennyolofsson23-netizen/claude-code-config --skill test-write-kennyolofsson23-netizen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing tests that match the project's strict conventions is time‑consuming and error‑prone. Without a guided approach, coverage gaps, inconsistent styles, and flaky tests arise, reducing confidence in code changes.

Core Features & Use Cases

  • Backend testing with pytest and asyncio fixtures, following the project's backend/tests/ layout.
  • Frontend component testing using Vitest and React Testing Library, with factories from lib/test-utils.tsx.
  • End‑to‑end testing via Playwright across multiple browsers.
  • Built‑in TDD flow (Red‑Green‑Refactor) and coverage enforcement (100 % line coverage required).
  • Automatic use of shared fixtures (fixture_game, fixture_race, mock_intel, client) to keep tests consistent.

Quick Start

Ask the test‑write skill to generate a failing test for a new backend endpoint you just added.

Frequently Asked Questions about test-write

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

FAQPage Schema
How do I write production-grade tests for a React frontend using Vitest?

Production-grade tests for a React frontend using Vitest rely on React Testing Library and shared test factories from lib/test-utils.tsx to ensure consistent component testing and full coverage.

What is the best way to automate pytest backend testing with asyncio fixtures?

Automating pytest backend testing with asyncio fixtures requires placing tests in the backend/tests/ directory and using shared fixtures like fixture_game and fixture_race to maintain consistency and enforce coverage.

Can I use Playwright for end-to-end testing across multiple browsers?

Playwright supports end-to-end testing across multiple browsers, enabling you to automate and validate full user flows while adhering to project conventions and strict coverage enforcement.

How does TDD Red-Green-Refactor enforce 100% line coverage in testing?

The TDD Red-Green-Refactor flow enforces 100% line coverage by requiring you to write a failing test first, implement the minimum code to pass, and then refactor while validating that all lines are executed.

Why do my Vitest and pytest tests fail to match project conventions?

Vitest and pytest tests fail to match project conventions when shared fixtures and established test patterns are not used, leading to inconsistent styles, flaky tests, and coverage gaps that reduce code change confidence.