Testing Blocks

Community

Validate AEM code, ship with confidence. AI handles the checks.

Authorshsteimer
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Ensuring code quality and preventing regressions in AEM Edge Delivery projects can be complex and time-consuming. This skill provides a comprehensive, pragmatic testing framework, guiding developers through unit, browser, and performance testing to deliver high-quality code efficiently.

Core Features & Use Cases

  • Pragmatic Testing Workflow: Guides through a "value vs. cost" testing philosophy, distinguishing between "keeper" unit tests for critical logic and "throwaway" browser tests for UI validation.
  • Automated Quality Checks: Integrates linting, unit testing (Vitest), and automated performance validation (via GitHub checks) into the development lifecycle.
  • Browser Testing Guidance: Provides detailed instructions for using Playwright/Puppeteer for visual and functional UI validation, including screenshot capture.
  • Use Case: After implementing a new AEM block, this skill ensures you've covered all bases: unit tests for helper functions, browser tests for visual and interactive behavior, linting for code style, and performance checks for site speed, all before submitting a pull request.

Quick Start

Example: Run all unit tests

npm test

Example: Run linting and auto-fix issues

npm run lint:fix

Example: Run a throwaway browser test (requires Playwright setup)

First, ensure dev server is running: aem up --html-folder drafts

Then, execute your temporary Playwright script:

node test/tmp/test-my-block.js

Dependency Matrix

Required Modules

playwrightvitestjsdom@vitest/ui@vitest/coverage-v8gh cli

Components

resources

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Testing Blocks
Download link: https://github.com/shsteimer/shsteimer-com/archive/main.zip#testing-blocks

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.