Testing & Debugging

Automate unit, integration, and end-to-end tests with Vitest and Playwright.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/joabeoliveira/kit-skills --skill testing-debugging-joabeoliveira
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Testing & Debugging
Source: https://github.com/joabeoliveira/kit-skills/tree/main/.skills/testing-and-debugging
Command: npx skills add https://github.com/joabeoliveira/kit-skills --skill testing-debugging-joabeoliveira

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standards and practices to ensure software reliability by applying automated tests and disciplined debugging from the start.

Core Features & Use Cases

  • Unit Testing: Write tests for pure business logic and utilities using Vitest.
  • Integration & E2E Testing: Validate server actions, API routes, and critical user flows end-to-end with Playwright.
  • Debugging Practices: Use structured logging, robust error handling with try/catch, and detailed validation diagnostics (e.g., Zod) to speed issue resolution.

Quick Start

Configure your environment and begin by adding Vitest unit tests, then implement Playwright E2E tests, and enable structured logging from day one.

Frequently Asked Questions about Testing & Debugging

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

FAQPage Schema
How do I set up automated testing for my web application using Vitest and Playwright?

Automated testing with Vitest and Playwright involves writing unit tests for business logic and end-to-end tests for critical user flows. You start by configuring the environment, adding Vitest unit tests, then implementing Playwright E2E tests.

What is the best way to debug server actions and API routes in web applications?

The best way to debug server actions and API routes is using structured logging, robust try/catch error handling, and detailed validation diagnostics with Zod. These practices speed up issue resolution by providing clear runtime traces.

Can I use Zod for schema validation and error handling during integration testing?

Yes, Zod can be used for schema validation and error handling during integration testing. It provides detailed validation diagnostics that help identify data structure issues quickly when validating server actions and API routes.

How do I write end-to-end tests for critical user flows with Playwright?

To write end-to-end tests with Playwright, you validate critical user flows across client and server codebases. This ensures your web application's complete user journeys function correctly from start to finish.

Why do I need structured logging and error handling from day one in a new project?

Structured logging and error handling are needed from day one to ensure software reliability and speed issue resolution. Implementing these debugging practices early establishes discipline and prevents complex debugging later.

Does Vitest work for both client and server codebase testing?

Yes, Vitest works for both client and server codebase testing. It is used to write unit tests for pure business logic and utilities across web applications, ensuring comprehensive code quality coverage.