Testing Blocks

Validate AEM Edge Delivery code changes with Vitest unit tests and Playwright browser checks.

Updated Jan 13, 2026
One-click install
npx skills add https://github.com/ak8458/abc-boilerplate --skill testing-blocks-ak8458
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Testing Blocks
Source: https://github.com/ak8458/abc-boilerplate/tree/main/.skills/testing-blocks
Command: npx skills add https://github.com/ak8458/abc-boilerplate --skill testing-blocks-ak8458

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Testing Blocks guidance helps development teams validate code changes in AEM Edge Delivery projects by outlining structured testing practices, ensuring tests provide value without slowing progress.

Core Features & Use Cases

  • Keeper tests for logic-heavy utilities and data processing
  • Browser tests to validate block decoration, rendering, and interactions
  • Linting and workflow guidance to ensure clean PRs and predictable CI

Quick Start

Run the unit tests with npm run test:watch to begin validating changes in real time.

Frequently Asked Questions about Testing Blocks

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

FAQPage Schema
How do I set up unit testing for AEM Edge Delivery block decorations?

To set up unit testing for AEM Edge Delivery block decorations, use Vitest to validate logic-heavy utilities and run npm run test:watch for real-time feedback during feature development. Playwright handles browser testing for visual rendering and interactions.

What is the best way to validate code changes before preparing an AEM Edge Delivery PR?

The best way to validate code changes for an AEM Edge Delivery PR is to enforce Vitest-based unit tests, Playwright browser checks, and linting. This structured workflow ensures clean PRs, fast feedback, and maintainable quality.

Does Vitest work with Playwright for browser testing in AEM projects?

Yes, Vitest and Playwright work together in AEM projects by dividing testing responsibilities. Vitest executes unit tests for data processing utilities, while Playwright handles browser testing to validate block decoration, rendering, and user interactions.

Can I use Playwright to test block rendering and interactions in AEM Edge Delivery?

Yes, you can use Playwright to test block rendering and interactions in AEM Edge Delivery. It provides browser testing capabilities that validate block decoration and rendering behavior, ensuring reliable visual output and functional interactions.

Why does my AEM Edge Delivery testing workflow slow down feature development?

Your AEM Edge Delivery testing workflow slows down feature development if it lacks structured practices. Implementing keeper tests for logic-heavy utilities and targeted browser tests provides validation value without slowing progress or blocking CI workflows.

Do I need to run linting alongside Vitest and Playwright checks for CI-ready workflows?

Yes, you need to run linting alongside Vitest and Playwright checks for CI-ready workflows. Linting ensures clean PRs and predictable CI by enforcing code quality standards, complementing unit and browser tests for reliable builds.