monorepo-testing-strategy

Define layered unit, integration, and end-to-end testing with Vitest and Playwright.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/pohlai88/AFENDA-NEXUS2 --skill monorepo-testing-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monorepo-testing-strategy
Source: https://github.com/pohlai88/AFENDA-NEXUS2/tree/main/.agents/skills/monorepo-testing-strategy
Command: npx skills add https://github.com/pohlai88/AFENDA-NEXUS2 --skill monorepo-testing-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to implementing a robust and efficient testing strategy within the AFENDA-NEXUS monorepo, ensuring code quality and reliability.

Core Features & Use Cases

  • Layered Testing: Understand and implement unit, integration, and E2E tests.
  • Coverage Standards: Adhere to defined code coverage thresholds for different layers.
  • Best Practices: Learn naming conventions, AAA pattern, test independence, and effective mocking.
  • Use Case: When developing a new feature in the afenda-accounting package, consult this Skill to understand the recommended structure for unit and integration tests, and how to configure Vitest for optimal coverage.

Quick Start

Use the monorepo-testing-strategy skill to learn how to write unit tests for a new service.

Frequently Asked Questions about monorepo-testing-strategy

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

FAQPage Schema
What is a layered monorepo testing strategy?

A layered monorepo testing strategy separates tests into unit, integration, and end-to-end tiers. This approach ensures targeted code coverage and reliability across packages by applying specific testing frameworks like Vitest and Playwright to each functional layer.

How do I configure Vitest for monorepo code coverage?

To configure Vitest for monorepo code coverage, establish defined coverage thresholds for different testing layers. Structure your test files to align with package boundaries and apply fixture patterns to ensure test independence and optimal coverage reporting.

Does this testing strategy support Playwright e2e testing?

Yes, this testing strategy supports Playwright e2e testing. It details framework usage for Playwright to execute end-to-end tests across the monorepo, ensuring comprehensive validation of user flows and inter-package functional integration.

What's the best way to structure integration testing in a monorepo?

The best way to structure integration testing in a monorepo is to follow the AAA pattern and specific naming conventions. Maintain test independence by using effective mocking and targeted fixture patterns to validate interactions between discrete packages.

How do I integrate monorepo testing into CI/CD pipelines?

To integrate monorepo testing into CI/CD pipelines, configure Vitest and Playwright to run automatically during continuous integration. Enforce code coverage standards and reliability checks across packages to prevent deploying unverified code.

Why does monorepo testing require specific fixture patterns?

Monorepo testing requires specific fixture patterns to guarantee test independence and prevent cross-package data contamination. Using standardized fixtures with Vitest ensures that unit and integration tests remain isolated and produce reliable coverage metrics.