testing

Apply AAA patterns and mock guidance to Jest, Vitest, and PHPUnit test suites.

1|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/enact-on/super-ai-github --skill testing-enact-on
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/enact-on/super-ai-github/tree/main/.opencode/skill/testing
Command: npx skills add https://github.com/enact-on/super-ai-github --skill testing-enact-on

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing patterns across JavaScript/TypeScript and PHP help teams prevent regressions and ensure code quality by providing clear guidance for Jest, Vitest, and PHPUnit.

Core Features & Use Cases

  • AAA testing patterns: Adopt Arrange-Act-Assert, consistent setup/teardown, and isolated tests to improve reliability.
  • Cross-framework guidance: Covers Jest and Vitest for JS/TS projects and PHPUnit for PHP projects with practical examples.
  • Test quality guardrails: Includes mocks, clear naming conventions, and coverage guidance to catch regressions early.

Quick Start

Review the included examples and adapt them to your project. Run npm test to execute JS/TS tests or phpunit to run PHP tests. Apply AAA, mocks, and coverage practices to your test suites.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I structure unit tests using the Arrange-Act-Assert pattern in Jest and Vitest?

The Arrange-Act-Assert (AAA) pattern separates test setup, execution, and verification to improve reliability. This Skill provides consistent setup and teardown guidance with practical examples for JavaScript and TypeScript projects using Jest and Vitest.

What are the best practices for mocking dependencies in PHPUnit and Vitest?

Mocking dependencies in PHPUnit and Vitest isolates tests by replacing external modules with controlled stubs. This Skill includes clear mock usage guidelines and test quality guardrails to catch regressions early across PHP and JavaScript environments.

Does this testing guidance apply to both JavaScript and PHP projects?

This testing guidance applies to both JavaScript and PHP projects. It offers cross-framework support covering Jest and Vitest for JS/TS unit testing, alongside PHPUnit for PHP, ensuring consistent test organization and quality guardrails.

How do I enforce test coverage targets across Vitest and PHPUnit suites?

Enforcing test coverage targets across Vitest and PHPUnit suites requires clear metrics and consistent practices. This Skill demonstrates specific coverage guidance and naming conventions to help teams prevent regressions and ensure code quality.

When should I use Vitest versus Jest for JavaScript and TypeScript testing?

Choosing between Vitest and Jest depends on your project's framework alignment and execution speed needs. This Skill provides cross-framework guidance covering both test runners with practical examples for JavaScript and TypeScript environments.