Agent Skill
2/7/2026

testing

Comprehensive testing skill for validating code changes. Covers unit testing (Vitest, Jest), integration testing, E2E testing (Playwright, Cypress), component testing, mocking (MSW, vi.mock), async/hook testing, CI/CD integration, and code coverage. Use after code changes or code-executor to ensure quality.

T
trongdepzai
2GitHub Stars
1Views
npx skills add Trongdepzai-dev/Xorium-Stealer-Pulsar

SKILL.md

Nametesting
DescriptionComprehensive testing skill for validating code changes. Covers unit testing (Vitest, Jest), integration testing, E2E testing (Playwright, Cypress), component testing, mocking (MSW, vi.mock), async/hook testing, CI/CD integration, and code coverage. Use after code changes or code-executor to ensure quality.

name: testing description: Comprehensive testing skill for validating code changes. Covers unit testing (Vitest, Jest), integration testing, E2E testing (Playwright, Cypress), component testing, mocking (MSW, vi.mock), async/hook testing, CI/CD integration, and code coverage. Use after code changes or code-executor to ensure quality. license: MIT version: 1.0.0

Testing Skill

Validate code changes with 2025-2026 testing best practices.

When to Use

  • After code changes or code-executor completes
  • Before committing or pushing code
  • When adding new features or fixing bugs
  • During code review validation

Quick Decision Matrix

NeedTool
Unit testsVitest (fast) / Jest (mature)
Component testsTesting Library + Vitest
E2E testsPlaywright / Cypress
API mockingMSW
Module mockingvi.mock / jest.mock
Hook testingrenderHook + act

Testing Pyramid

LevelCoverageFocus
Unit70%Functions, utils, logic
Integration20%Components, API calls
E2E10%Critical user journeys

Core Principles

  1. Test behavior, not implementation
  2. Arrange-Act-Assert (AAA) pattern
  3. Fast, isolated, repeatable tests
  4. Mock external dependencies
  5. CI/CD integration mandatory

Reference Files

TopicFile
Unit testingreferences/unit-testing.md
Integrationreferences/integration-testing.md
E2Ereferences/e2e-testing.md
Mockingreferences/mocking.md
Async/Hooksreferences/async-testing.md
CI/CDreferences/ci-integration.md
Code patternsreferences/code-patterns.md

Quick Validation Checklist

[ ] Run unit tests: npm test
[ ] Run integration tests: npm run test:integration
[ ] Check coverage: npm run test:coverage
[ ] Run E2E (critical paths): npm run test:e2e
[ ] Verify CI pipeline passes

Quick Start

import { describe, it, expect, vi } from 'vitest';

describe('MyFunction', () => {
  it('returns expected result', () => {
    // Arrange
    const input = 'test';
    // Act
    const result = myFunction(input);
    // Assert
    expect(result).toBe('expected');
  });
});

Resources

Skills Info
Original Name:testingAuthor:trongdepzai