Testing Blocks

Validate code changes in AEM Edge Delivery projects with Vitest and Playwright.

1|Updated Oct 3, 2025
One-click install
npx skills add https://github.com/initialyze/acme-services --skill testing-blocks-initialyze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Testing Blocks
Source: https://github.com/initialyze/acme-services/tree/main/.claude/.skills/testing-blocks
Command: npx skills add https://github.com/initialyze/acme-services --skill testing-blocks-initialyze

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Testing Blocks skill guides teams through testing code changes in AEM Edge Delivery projects, ensuring changes are reliable before merging and enabling faster feedback loops.

Core Features & Use Cases

  • Keeper tests for logic-heavy utilities and shared libraries
  • Throwaway browser tests for block decoration, UI behavior, and visual validation
  • Integration with Building Blocks and content-driven development workflows
  • Use case: validate a new or updated block by running unit tests, linting, and browser validations prior to PR submission

Quick Start

After implementing or modifying blocks, use this skill to run unit tests, lint, and browser tests as part of your PR-ready process.

Frequently Asked Questions about Testing Blocks

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

FAQPage Schema
How do I validate AEM Edge Delivery code changes before submitting a pull request?

You can validate AEM Edge Delivery code changes by running unit tests, linting, and browser tests using Vitest and Playwright. This structured testing workflow ensures your block modifications are reliable and fully PR-ready before merging.

What is the best way to test block decoration and UI behavior in AEM Edge Delivery?

The best way to test block decoration and UI behavior is using throwaway browser tests with Playwright. This approach validates visual elements and UI interactions directly in the browser as part of your content-driven development workflow.

Can I use Vitest for unit testing shared libraries in AEM Edge Delivery projects?

Yes, you can use Vitest for unit testing shared libraries and logic-heavy utilities in AEM Edge Delivery projects. Vitest acts as the primary framework for keeper tests to ensure your foundational code logic remains stable during changes.

Does the testing workflow integrate with the building-blocks development process?

Yes, the testing workflow integrates directly with the building-blocks development process. It provides a structured approach to run linting, unit tests, and browser validations, ensuring code changes meet quality standards prior to pull request submission.

Why do I need both keeper tests and throwaway browser tests for my blocks?

You need both because keeper tests secure logic-heavy utilities and shared libraries with Vitest, while throwaway browser tests validate block decoration and UI behavior with Playwright. Together they provide comprehensive coverage for reliable code changes.